summaryrefslogtreecommitdiff
path: root/apps/app_mixmonitor.c
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2013-08-30 16:27:57 +0000
committerKevin Harwell <kharwell@digium.com>2013-08-30 16:27:57 +0000
commit87bedd0695e57bb81ba4b077cc1d525205ad78b3 (patch)
tree160b02db485418b6a6a7f517fa4791f35e1fd6dd /apps/app_mixmonitor.c
parent1d3d6e0661bd000a0b4df2cbbe12c150ae8d2a1f (diff)
Fix memory leaks
(closes issue ASTERISK-22368) Reported by: Corey Farrell Patches: issueA22368_mixmonitor_free_filename.patch uploaded by wdoekes (license 5674) ........ Merged revisions 398004 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 398011 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 398016 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_mixmonitor.c')
-rw-r--r--apps/app_mixmonitor.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index 1c67a9ba5..f4ea27fe8 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -137,7 +137,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<variable name="MIXMONITOR_FILENAME">
<para>Will contain the filename used to record.</para>
</variable>
- </variablelist>
+ </variablelist>
</description>
<see-also>
<ref type="application">Monitor</ref>
@@ -404,7 +404,7 @@ static void destroy_monitor_audiohook(struct mixmonitor *mixmonitor)
ast_audiohook_destroy(&mixmonitor->audiohook);
}
-static int startmon(struct ast_channel *chan, struct ast_audiohook *audiohook)
+static int startmon(struct ast_channel *chan, struct ast_audiohook *audiohook)
{
int res = 0;
@@ -496,13 +496,15 @@ static void mixmonitor_free(struct mixmonitor *mixmonitor)
if (mixmonitor->mixmonitor_ds) {
ast_mutex_destroy(&mixmonitor->mixmonitor_ds->lock);
ast_cond_destroy(&mixmonitor->mixmonitor_ds->destruction_condition);
- ast_free(mixmonitor->filename_write);
- ast_free(mixmonitor->filename_read);
ast_free(mixmonitor->mixmonitor_ds);
- ast_free(mixmonitor->name);
- ast_free(mixmonitor->post_process);
}
+ ast_free(mixmonitor->name);
+ ast_free(mixmonitor->post_process);
+ ast_free(mixmonitor->filename);
+ ast_free(mixmonitor->filename_write);
+ ast_free(mixmonitor->filename_read);
+
/* Free everything in the recipient list */
clear_mixmonitor_recipient_list(mixmonitor);
@@ -586,7 +588,7 @@ static void mixmonitor_save_prep(struct mixmonitor *mixmonitor, char *filename,
}
}
-static void *mixmonitor_thread(void *obj)
+static void *mixmonitor_thread(void *obj)
{
struct mixmonitor *mixmonitor = obj;
char *fs_ext = "";