mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 06:48:25 +00:00
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
This commit is contained in:
@@ -137,7 +137,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
<variable name="MIXMONITOR_FILENAME">
|
<variable name="MIXMONITOR_FILENAME">
|
||||||
<para>Will contain the filename used to record.</para>
|
<para>Will contain the filename used to record.</para>
|
||||||
</variable>
|
</variable>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</description>
|
</description>
|
||||||
<see-also>
|
<see-also>
|
||||||
<ref type="application">Monitor</ref>
|
<ref type="application">Monitor</ref>
|
||||||
@@ -404,7 +404,7 @@ static void destroy_monitor_audiohook(struct mixmonitor *mixmonitor)
|
|||||||
ast_audiohook_destroy(&mixmonitor->audiohook);
|
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;
|
int res = 0;
|
||||||
|
|
||||||
@@ -496,13 +496,15 @@ static void mixmonitor_free(struct mixmonitor *mixmonitor)
|
|||||||
if (mixmonitor->mixmonitor_ds) {
|
if (mixmonitor->mixmonitor_ds) {
|
||||||
ast_mutex_destroy(&mixmonitor->mixmonitor_ds->lock);
|
ast_mutex_destroy(&mixmonitor->mixmonitor_ds->lock);
|
||||||
ast_cond_destroy(&mixmonitor->mixmonitor_ds->destruction_condition);
|
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->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 */
|
/* Free everything in the recipient list */
|
||||||
clear_mixmonitor_recipient_list(mixmonitor);
|
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;
|
struct mixmonitor *mixmonitor = obj;
|
||||||
char *fs_ext = "";
|
char *fs_ext = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user