mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
curl_multi_wait: OOM handling fix
This commit is contained in:
parent
a1fc9b80c8
commit
7a09907146
@ -929,8 +929,11 @@ CURLMcode curl_multi_wait(CURLM *multi_handle,
|
|||||||
easy = easy->next; /* check next handle */
|
easy = easy->next; /* check next handle */
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nfds)
|
if(nfds) {
|
||||||
ufds = (struct pollfd *)malloc(nfds * sizeof(struct pollfd));
|
ufds = malloc(nfds * sizeof(struct pollfd));
|
||||||
|
if(!ufds)
|
||||||
|
return CURLM_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
nfds = 0;
|
nfds = 0;
|
||||||
|
|
||||||
/* Add the curl handles to our pollfds first */
|
/* Add the curl handles to our pollfds first */
|
||||||
|
Loading…
Reference in New Issue
Block a user