]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi.c: fix possible dereference of null pointer
authorMarc Hoersken <info@marc-hoersken.de>
Sun, 5 Jan 2014 19:01:33 +0000 (20:01 +0100)
committerMarc Hoersken <info@marc-hoersken.de>
Sun, 5 Jan 2014 19:01:33 +0000 (20:01 +0100)
lib/multi.c

index ebee674dd62208cea9ebc2a8df3b493adcc52ab6..698a99eeb26424379f5bb605b3ddae16139a3780 100644 (file)
@@ -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? */