func_curl: Fix leak of an ast_str in error handling code path.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2012-03-24 23:46:16 +00:00
parent dea36a06bb
commit e068e29190

View File

@@ -595,6 +595,7 @@ static int acf_curl_helper(struct ast_channel *chan, const char *cmd, char *info
if (!(curl = ast_threadstorage_get(&curl_instance, sizeof(*curl)))) { if (!(curl = ast_threadstorage_get(&curl_instance, sizeof(*curl)))) {
ast_log(LOG_ERROR, "Cannot allocate curl structure\n"); ast_log(LOG_ERROR, "Cannot allocate curl structure\n");
ast_free(str);
return -1; return -1;
} }