mirror of
https://github.com/curl/curl.git
synced 2026-08-12 14:00:55 +03:00
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.
This commit is contained in:
parent
614bae813e
commit
e6d85923c1
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue