mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 00:24:05 +00:00
Fix memory leak and remove useless coe (bug #4318, with mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1300,21 +1300,26 @@ static struct localuser *wait_for_answer(struct queue_ent *qe, struct localuser
|
|||||||
if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
|
if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
|
||||||
/* Got hung up */
|
/* Got hung up */
|
||||||
*to=-1;
|
*to=-1;
|
||||||
|
if (f)
|
||||||
|
ast_frfree(f);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (f && (f->frametype == AST_FRAME_DTMF) && caller_disconnect && (f->subclass == '*')) {
|
if ((f->frametype == AST_FRAME_DTMF) && caller_disconnect && (f->subclass == '*')) {
|
||||||
if (option_verbose > 3)
|
if (option_verbose > 3)
|
||||||
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
|
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
|
||||||
*to=0;
|
*to=0;
|
||||||
|
ast_frfree(f);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (f && (f->frametype == AST_FRAME_DTMF) && (f->subclass != '*') && valid_exit(qe, f->subclass)) {
|
if ((f->frametype == AST_FRAME_DTMF) && (f->subclass != '*') && valid_exit(qe, f->subclass)) {
|
||||||
if (option_verbose > 3)
|
if (option_verbose > 3)
|
||||||
ast_verbose(VERBOSE_PREFIX_3 "User pressed digit: %c\n", f->subclass);
|
ast_verbose(VERBOSE_PREFIX_3 "User pressed digit: %c\n", f->subclass);
|
||||||
*to=0;
|
*to=0;
|
||||||
*digit=f->subclass;
|
*digit=f->subclass;
|
||||||
|
ast_frfree(f);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
ast_frfree(f);
|
||||||
}
|
}
|
||||||
if (!*to && (option_verbose > 2))
|
if (!*to && (option_verbose > 2))
|
||||||
ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", orig);
|
ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", orig);
|
||||||
|
Reference in New Issue
Block a user