]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
wait_or_timeout: return failure when Curl_poll() fails
authorDaniel Stenberg <daniel@haxx.se>
Thu, 2 Oct 2014 20:52:23 +0000 (22:52 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 2 Oct 2014 20:52:23 +0000 (22:52 +0200)
Coverity detected this. CID 1241954. When Curl_poll() returns a negative value
'mcode' was uninitialized. Pretty harmless since this is debug code only and
would at worst cause an error to _not_ be returned...

lib/easy.c

index 160712e8f38e5ba9590413848473be0ce9083efa..1408aa8ac251a47ee7db449eeb5f0a478fac3712 100644 (file)
@@ -630,6 +630,9 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
         ev->ms += curlx_tvdiff(after, before);
 
     }
+    else
+      return CURLE_RECV_ERROR;
+
     if(mcode)
       return CURLE_URL_MALFORMAT; /* TODO: return a proper error! */