From: Russell Bryant Date: Sat, 24 Mar 2012 23:47:42 +0000 (+0000) Subject: func_curl: Fix leak of an ast_str in error handling code path. X-Git-Tag: 10.3.0~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c853470631f871daa64f469f62079fc5095eac1;p=thirdparty%2Fasterisk.git func_curl: Fix leak of an ast_str in error handling code path. ........ Merged revisions 360413 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@360414 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 8f49c16a6b..e011461fe0 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -608,6 +608,7 @@ static int acf_curl_helper(struct ast_channel *chan, const char *cmd, char *info if (!(curl = ast_threadstorage_get(&curl_instance, sizeof(*curl)))) { ast_log(LOG_ERROR, "Cannot allocate curl structure\n"); + ast_free(str); return -1; }