From: Matthew Jordan Date: Mon, 12 Jan 2015 15:11:08 +0000 (+0000) Subject: funcs/func_curl: Fix memory leak when CURLOPT channel datastore is destroyed X-Git-Tag: 11.16.0-rc1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d5f0a0db998d6fc2a9c812827a03b536c8b2c79;p=thirdparty%2Fasterisk.git funcs/func_curl: Fix memory leak when CURLOPT channel datastore is destroyed When the channel datastore associated with the usage of CURLOPT on a specific channel is freed, the underlying structure holding the list of options is not disposed of. This patch properly frees the structure in the datastore .destroy callback. ASTERISK-24672 #close Reported by: Kristian Hogh patches: func_curl-memory-leak.diff uploaded by Kristian Hogh (License 6639) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@430487 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_curl.c b/funcs/func_curl.c index b8f8c1218c..1a69071236 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -198,6 +198,7 @@ static void curlds_free(void *data) free(setting); } AST_LIST_HEAD_DESTROY(list); + ast_free(list); } enum optiontype {