mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Check for a NULL easy->easy_conn in multi_getsock() since it can in fact
happen when curl_multi_remove_handle() is called. CID 13. coverity.com scan
This commit is contained in:
parent
3af08472ad
commit
b9e5fecf5f
@ -680,7 +680,14 @@ static int multi_getsock(struct Curl_one_easy *easy,
|
||||
of sockets */
|
||||
int numsocks)
|
||||
{
|
||||
if (easy->easy_handle->state.pipe_broke) {
|
||||
/* If the pipe broke, or if there's no connection left for this easy handle,
|
||||
then we MUST bail out now with no bitmask set. The no connection case can
|
||||
happen when this is called from curl_multi_remove_handle() =>
|
||||
singlesocket() => multi_getsock().
|
||||
*/
|
||||
|
||||
if (easy->easy_handle->state.pipe_broke ||
|
||||
!easy->easy_conn) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user