Merged revisions 33510 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Sun, 11 Jun 2006 20:39:19 +0000 (20:39 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sun, 11 Jun 2006 20:39:19 +0000 (20:39 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33510 | russell | 2006-06-11 16:38:39 -0400 (Sun, 11 Jun 2006) | 2 lines

fix two places that would cause a frame to be leaked

........

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

apps/app_alarmreceiver.c

index c69417a..faa2c6a 100644 (file)
@@ -206,6 +206,7 @@ static int send_tone_burst(struct ast_channel *chan, float freq, int duration, i
 
                        i += wf.datalen / 8;
                        if (i > duration) {
+                               ast_frfree(f);
                                break;
                        }
                        if (ast_write(chan, &wf)){
@@ -213,6 +214,7 @@ static int send_tone_burst(struct ast_channel *chan, float freq, int duration, i
                                        ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Failed to write frame on %s\n", chan->name);
                                ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",chan->name);
                                res = -1;
+                               ast_frfree(f);
                                break;
                        }
                }