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; }