curl_threads: don't do another malloc if the first fails
No binary (build failed)
—
(log yok)
| @@ -54,8 +54,11 @@ curl_thread_t Curl_thread_create(CURL_THREAD_RETURN_T | |
| (CURL_STDCALL *func) (void *), void *arg) | |
| { | |
| curl_thread_t t = curlx_malloc(sizeof(pthread_t)); | |
| - | struct Curl_actual_call *ac = curlx_malloc(sizeof(struct Curl_actual_call)); |
| + | struct Curl_actual_call *ac = NULL; |
| int rc; | |
| + | |
| + | if(t) |
| + | ac = curlx_malloc(sizeof(struct Curl_actual_call)); |
| if(!(ac && t)) | |
| goto err; | |