From: Russell Bryant Date: Wed, 30 Jul 2008 19:52:53 +0000 (+0000) Subject: Fix a memory leak in func_curl. Every thread that used this function leaked X-Git-Tag: 1.4.22-rc1~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a5caf1a5751e2cfb18d2206ba0cdc6118fa457a;p=thirdparty%2Fasterisk.git Fix a memory leak in func_curl. Every thread that used this function leaked an allocation the size of a pointer. (reported by jmls in #asterisk-dev) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@134540 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 63d6a05970..bc6eadee08 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -89,6 +89,8 @@ static void curl_instance_cleanup(void *data) CURL **curl = data; curl_easy_cleanup(*curl); + + free(data); } AST_THREADSTORAGE_CUSTOM(curl_instance, curl_instance_init, curl_instance_cleanup);