From: Tilghman Lesher Date: Thu, 16 Jul 2009 16:27:35 +0000 (+0000) Subject: Fix a memory leak. X-Git-Tag: 1.4.26.2~4^2~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed177d72d48b0c97bae7714ce7ccfbb9e068efaa;p=thirdparty%2Fasterisk.git 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 --- diff --git a/funcs/func_realtime.c b/funcs/func_realtime.c index 6941b224ec..ce64cba4ec 100644 --- a/funcs/func_realtime.c +++ b/funcs/func_realtime.c @@ -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)