diff --git a/funcs/func_curl.c b/funcs/func_curl.c index e011461fe0..a4328b9239 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -302,6 +302,7 @@ static int acf_curlopt_write(struct ast_channel *chan, const char *cmd, char *na if (!(list = ast_calloc(1, sizeof(*list)))) { ast_log(LOG_ERROR, "Unable to allocate list head. Cannot set any CURL options\n"); ast_datastore_free(store); + return -1; } store->data = list;