From: Marc Hoersken Date: Sun, 5 Jan 2014 19:01:33 +0000 (+0100) Subject: multi.c: fix possible dereference of null pointer X-Git-Tag: curl-7_35_0~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61312fe66f019bc48055f54f2647b8ce55acc014;p=thirdparty%2Fcurl.git multi.c: fix possible dereference of null pointer --- diff --git a/lib/multi.c b/lib/multi.c index ebee674dd6..698a99eeb2 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -2162,10 +2162,12 @@ static CURLMcode multi_socket(struct Curl_multi *multi, /* walk through each easy handle and do the socket state change magic and callbacks */ - data=multi->easyp; - while(data) { - singlesocket(multi, data); - data = data->next; + if(result != CURLM_BAD_HANDLE) { + data=multi->easyp; + while(data) { + singlesocket(multi, data); + data = data->next; + } } /* or should we fall-through and do the timer-based stuff? */