]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixes memory leak caused by incorrectly freeing mixmonitor
authorDavid Vossel <dvossel@digium.com>
Wed, 19 Aug 2009 21:18:37 +0000 (21:18 +0000)
committerDavid Vossel <dvossel@digium.com>
Wed, 19 Aug 2009 21:18:37 +0000 (21:18 +0000)
(closes issue #15699)
Reported by: edantie
Patches:
      mixmonitor.patch uploaded by edantie (license 862)

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

apps/app_mixmonitor.c

index 3f784f7309e1cfbbf39d09cc1d45e7ce7e205935..50cc64fb21ab426328fc9f27eb74f81095922120 100644 (file)
@@ -388,7 +388,7 @@ static void launch_monitor_thread(struct ast_channel *chan, const char *filename
 
        /* Setup the actual spy before creating our thread */
        if (ast_audiohook_init(&mixmonitor->audiohook, AST_AUDIOHOOK_TYPE_SPY, mixmonitor_spy_type)) {
-               free(mixmonitor);
+               mixmonitor_free(mixmonitor);
                return;
        }
        
@@ -404,7 +404,7 @@ static void launch_monitor_thread(struct ast_channel *chan, const char *filename
                        mixmonitor_spy_type, chan->name);
                /* Since we couldn't add ourselves - bail out! */
                ast_audiohook_destroy(&mixmonitor->audiohook);
-               free(mixmonitor);
+               mixmonitor_free(mixmonitor);
                return;
        }