From e1cfc18a78195cce9504b61f0aaeb4b61582fa15 Mon Sep 17 00:00:00 2001 From: Kevin Harwell Date: Thu, 29 Aug 2013 21:37:29 +0000 Subject: Memory leaks fix (closes ASTERISK-22376) Reported by: John Hardin Patches: memleak.patch uploaded by jhardin (license 6512) memleak2.patch uploaded by jhardin (license 6512) ........ Merged revisions 397946 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397947 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/file.c') diff --git a/main/file.c b/main/file.c index 4783c416f..b24cdeeb3 100644 --- a/main/file.c +++ b/main/file.c @@ -75,9 +75,9 @@ STASIS_MESSAGE_TYPE_DEFN(ast_format_unregister_type); static struct ast_json *json_array_from_list(const char *list, const char *sep) { RAII_VAR(struct ast_json *, array, ast_json_array_create(), ast_json_unref); - RAII_VAR(char *, stringp, ast_strdup(list), ast_free); - char *ext; + char *stringp, *ext; + stringp = ast_strdupa(list); /* this is in the stack so does not need to be freed */ if (!array || !stringp) { return NULL; } -- cgit v1.2.3