[Asterisk-cvs] asterisk/apps app_queue.c,1.137,1.138
markster at lists.digium.com
markster at lists.digium.com
Mon May 30 09:30:58 CDT 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv12892/apps
Modified Files:
app_queue.c
Log Message:
Fix memory leak and remove useless coe (bug #4318, with mods)
Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -d -r1.137 -r1.138
--- app_queue.c 15 May 2005 05:42:51 -0000 1.137
+++ app_queue.c 30 May 2005 13:34:23 -0000 1.138
@@ -1300,21 +1300,26 @@
if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
/* Got hung up */
*to=-1;
+ if (f)
+ ast_frfree(f);
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)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
+ ast_frfree(f);
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)
ast_verbose(VERBOSE_PREFIX_3 "User pressed digit: %c\n", f->subclass);
*to=0;
*digit=f->subclass;
+ ast_frfree(f);
return NULL;
}
+ ast_frfree(f);
}
if (!*to && (option_verbose > 2))
ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", orig);
More information about the svn-commits
mailing list