Skip to content
Snippets Groups Projects
Commit 4429bce8 authored by Mark Spencer's avatar Mark Spencer
Browse files

Add missing free's in rare circumstances (bug #2985)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 0455688e
No related branches found
No related tags found
No related merge requests found
......@@ -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))) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment