]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a memory leak.
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 16 Jul 2009 16:27:35 +0000 (16:27 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 16 Jul 2009 16:27:35 +0000 (16:27 +0000)
(closes issue #15517)
 Reported by: adomjan
 Patches:
       func_realtime.c-ast_variable_destroy.diff uploaded by adomjan (license 487)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@206807 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_realtime.c

index 6941b224ecd28598802038a339b68009f014b584..ce64cba4eca52f557e3b87ee62a33736fe24fc52 100644 (file)
@@ -93,6 +93,8 @@ static int function_realtime_read(struct ast_channel *chan, char *cmd, char *dat
                ast_build_string(&results, &resultslen, "%s%s%s%s", var->name, args.delim2, var->value, args.delim1);
        ast_copy_string(buf, result_begin, len);
 
+       ast_variables_destroy(head);
+
        ast_module_user_remove(u);
 
        if (chan)