From: Russell Bryant Date: Sun, 11 Jun 2006 20:38:39 +0000 (+0000) Subject: fix two places that would cause a frame to be leaked X-Git-Tag: 1.2.10~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33661e9258884ff3b62345eb36964abd4f7dbc5d;p=thirdparty%2Fasterisk.git fix two places that would cause a frame to be leaked git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33510 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c index 95abe1439e..ae564d841d 100644 --- a/apps/app_alarmreceiver.c +++ b/apps/app_alarmreceiver.c @@ -215,6 +215,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)){ @@ -222,6 +223,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; } }