mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 19:38:22 +00:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user