summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2012-03-24 23:49:39 +0000
committerRussell Bryant <russell@russellbryant.com>2012-03-24 23:49:39 +0000
commit5affceaa156250f240d742377576c17c6709e4f7 (patch)
treedf31cb9656ac3c0c7a937bf8e9e76a91d5e1e7ae
parentd6d7f51476fd013434a521f5ce7737a9038e14f3 (diff)
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 ........ Merged revisions 360414 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--funcs/func_curl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/funcs/func_curl.c b/funcs/func_curl.c
index 8f49c16a6..e011461fe 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;
}