[Freeswitch-svn] [commit] r12332 - freeswitch/trunk/src

FreeSWITCH SVN mrene at freeswitch.org
Fri Feb 27 11:29:53 PST 2009


Author: mrene
Date: Fri Feb 27 13:29:52 2009
New Revision: 12332

Log:
fix leak

Modified:
   freeswitch/trunk/src/switch_channel.c

Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c	(original)
+++ freeswitch/trunk/src/switch_channel.c	Fri Feb 27 13:29:52 2009
@@ -279,7 +279,9 @@
 		*dt = new_dtmf;
 
 		while (switch_queue_trypush(channel->dtmf_queue, dt) != SWITCH_STATUS_SUCCESS) {
-			switch_queue_trypop(channel->dtmf_queue, &pop);
+			if (switch_queue_trypop(channel->dtmf_queue, &pop) == SWITCH_STATUS_SUCCESS) {
+				free(pop);
+			}
 			if (++x > 100) {
 				status = SWITCH_STATUS_FALSE;
 				free(dt);



More information about the Freeswitch-svn mailing list