[svn-commits] branch 1.2 r33545 - /branches/1.2/apps/app_meetme.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Jun 11 14:08:05 MST 2006


Author: russell
Date: Sun Jun 11 16:08:04 2006
New Revision: 33545

URL: http://svn.digium.com/view/asterisk?rev=33545&view=rev
Log:
fix up five little places where frames would not be free'd and remove an
unnecessary mutex_unlock where there is no way for it to be locked at
that time

Modified:
    branches/1.2/apps/app_meetme.c

Modified: branches/1.2/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_meetme.c?rev=33545&r1=33544&r2=33545&view=diff
==============================================================================
--- branches/1.2/apps/app_meetme.c (original)
+++ branches/1.2/apps/app_meetme.c Sun Jun 11 16:08:04 2006
@@ -1327,16 +1327,19 @@
 					tmp[1] = '\0';
 					if (!ast_goto_if_exists(chan, exitcontext, tmp, 1)) {
 						ret = 0;
+						ast_frfree(f);
 						break;
 					} else if (option_debug > 1)
 						ast_log(LOG_DEBUG, "Exit by single digit did not work in meetme. Extension %s does not exist in context %s\n", tmp, exitcontext);
 				} else if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#') && (confflags & CONFFLAG_POUNDEXIT)) {
 					ret = 0;
+					ast_frfree(f);
 					break;
 				} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
 					if (ioctl(fd, ZT_SETCONF, &ztc_empty)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
+						ast_frfree(f);
 						goto outrun;
 					}
 
@@ -1494,7 +1497,7 @@
 					if (ioctl(fd, ZT_SETCONF, &ztc)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
-						ast_mutex_unlock(&conflock);
+						ast_frfree(f);
 						goto outrun;
 					}
 
@@ -2174,8 +2177,10 @@
 			}
 			if (f->frametype == AST_FRAME_VOICE) {
 				res = ast_writestream(s, f);
-				if (res) 
+				if (res) {
+					ast_frfree(f);
 					break;
+				}
 			}
 			ast_frfree(f);
 			if (cnf->recording == MEETME_RECORD_TERMINATE) {



More information about the svn-commits mailing list