aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-06 17:12:21 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-06 17:12:21 +0000
commit74ac48315f7d0b9b4e62c042a4fbfcd4ae06ba8b (patch)
tree38e68c0cf76636f2d27a8549818f63860ed243e1
parent5eff2c8eddd6b223fe44a9e917dfb8184040aaaa (diff)
Add missing free's in rare circumstances (bug #2985)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4391 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xapps/app_dial.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index ce386b32a..ab1a94783 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -431,6 +431,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
/* Got hung up */
*to=-1;
strncpy(status, "CANCEL", statussize - 1);
+ if (f)
+ ast_frfree(f);
return NULL;
}
if (f && (f->frametype == AST_FRAME_DTMF) && *allowdisconnect_out &&
@@ -439,6 +441,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
strcpy(status, "CANCEL");
+ ast_frfree(f);
return NULL;
}
if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF))) {