[Asterisk-cvs] asterisk/apps app_dial.c,1.94.2.1,1.94.2.2

russell at lists.digium.com russell at lists.digium.com
Mon Dec 6 18:17:30 CST 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv23618/apps

Modified Files:
      Tag: v1-0
	app_dial.c 
Log Message:
Add missing free's in rare circumstances (bug #2985)


Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.94.2.1
retrieving revision 1.94.2.2
diff -u -d -r1.94.2.1 -r1.94.2.2
--- app_dial.c	8 Oct 2004 02:50:22 -0000	1.94.2.1
+++ app_dial.c	6 Dec 2004 23:15:19 -0000	1.94.2.2
@@ -384,6 +384,8 @@
 				/* 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 &&
@@ -392,6 +394,7 @@
 				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)))  {




More information about the svn-commits mailing list