aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 6506b5ee4..938846769 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1024,8 +1024,12 @@ CURLMcode curl_multi_wait(CURLM *multi_handle,
++nfds;
}
- /* wait... */
- i = Curl_poll(ufds, nfds, timeout_ms);
+ if(nfds)
+ /* wait... */
+ i = Curl_poll(ufds, nfds, timeout_ms);
+ else
+ i = 0;
+
free(ufds);
if(ret)
*ret = i;