Fix a memory leak.

(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
This commit is contained in:
Tilghman Lesher
2009-07-16 16:27:35 +00:00
parent 7782df0963
commit ed177d72d4

View 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)