]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix small memory leak
authorDavid Ruggles <thedavidfactor@gmail.com>
Fri, 4 Mar 2011 00:34:13 +0000 (00:34 +0000)
committerDavid Ruggles <thedavidfactor@gmail.com>
Fri, 4 Mar 2011 00:34:13 +0000 (00:34 +0000)
fix small memory leak caused by a string allocation that wasn't freed

(closes issue #18907)
Reported by: andy11
Patches:
      asterisk_trunk-app_externalivr-leak.patch uploaded by andy11 (license 1224)

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

apps/app_externalivr.c

index 42fd469c314f6057269420f069f10ffc71aa2ba7..965241b3a06fbf606bf98c19018741b9e012690c 100644 (file)
@@ -112,6 +112,7 @@ static void send_child_event(FILE *handle, const char event, const char *data,
 
        fprintf(handle, "%s\n", tmp);
        ast_chan_log(LOG_DEBUG, chan, "sent '%s'\n", tmp);
+       ast_free(tmp);
 }
 
 static void *gen_alloc(struct ast_channel *chan, void *params)