/* allocate internal array for the internal event handles */
handles = malloc(nfds * sizeof(HANDLE));
if(handles == NULL) {
+ free(fdarr);
errno = ENOMEM;
return -1;
}
/* allocate internal array for the internal socket handles */
wsasocks = malloc(nfds * sizeof(curl_socket_t));
if(wsasocks == NULL) {
+ free(handles);
+ free(fdarr);
errno = ENOMEM;
return -1;
}
/* allocate internal array for the internal WINSOCK2 events */
wsaevents = malloc(nfds * sizeof(WSAEVENT));
if(wsaevents == NULL) {
+ free(wsasocks);
+ free(handles);
+ free(fdarr);
errno = ENOMEM;
return -1;
}