From: Daniel Stenberg Date: Tue, 24 Dec 2013 23:53:15 +0000 (+0100) Subject: Curl_thread_create: use Curl_safefree to allow NULL better X-Git-Tag: curl-7_35_0~180 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ff0a994ada62a;p=thirdparty%2Fcurl.git Curl_thread_create: use Curl_safefree to allow NULL better free() itself allows a NULL input but our memory debug system requires Curl_safefree() to be used instead when a "legitimate" NULL may be freed. Like in the code here. Pointed-out-by: Steve Holme --- diff --git a/lib/curl_threads.c b/lib/curl_threads.c index 97527807ea..d40e024c87 100644 --- a/lib/curl_threads.c +++ b/lib/curl_threads.c @@ -77,8 +77,8 @@ curl_thread_t Curl_thread_create(unsigned int (*func) (void*), void *arg) return t; err: - free(t); - free(ac); + Curl_safefree(t); + Curl_safefree(ac); return curl_thread_t_null; }