diff options
author | Daniel Stenberg <daniel@haxx.se> | 2010-06-18 23:46:09 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2010-06-18 23:46:09 +0200 |
commit | e6d85923c1e9d4a9b76b67a4b31f0815e051b071 (patch) | |
tree | 9ad114433b2244622c28d7ec8ddf145e8f0c4c10 /lib | |
parent | 614bae813e0adf472a5c3d20abf98646a1b24dbf (diff) |
multi: prevent NULL pointer dereference
My additional call to Curl_pgrsUpdate() would sometimes get
called even though there's no connection (left) so a NULL pointer
would get passed, causing a segfault.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/multi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c index b42f68d0f..ea284b3f3 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1527,7 +1527,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, multistate(easy, CURLM_STATE_COMPLETED); } - else if(Curl_pgrsUpdate(easy->easy_conn)) + /* if there's still a connection to use, call the progress function */ + else if(easy->easy_conn && Curl_pgrsUpdate(easy->easy_conn)) easy->result = CURLE_ABORTED_BY_CALLBACK; } } while(0); |