From a8ec986981d6a218ce3abac27b9e0b0e76286863 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 2 Oct 2014 22:52:23 +0200 Subject: wait_or_timeout: return failure when Curl_poll() fails 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 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/easy.c') diff --git a/lib/easy.c b/lib/easy.c index 160712e8f..1408aa8ac 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -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! */ -- cgit v1.2.3