aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-11 20:38:39 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-11 20:38:39 +0000
commit85b49f818bb42ef079d51ede150fd733a9508738 (patch)
treea66e4c61313630c61945ff284f908066a2ea4c6f
parent2f33b7c1cdd9597f4c914f6fa64f2dab03b59bc2 (diff)
fix two places that would cause a frame to be leaked
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@33510 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_alarmreceiver.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c
index 95abe1439..ae564d841 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;
}
}