From 61312fe66f019bc48055f54f2647b8ce55acc014 Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Sun, 5 Jan 2014 20:01:33 +0100 Subject: multi.c: fix possible dereference of null pointer --- lib/multi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/multi.c b/lib/multi.c index ebee674dd..698a99eeb 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? */ -- cgit v1.2.3