[Freeswitch-svn] [commit] r7308 - freeswitch/trunk/src/mod/event_handlers/mod_event_socket

Freeswitch SVN anthm at freeswitch.org
Sun Jan 20 17:39:08 EST 2008


Author: anthm
Date: Sun Jan 20 17:39:08 2008
New Revision: 7308

Modified:
   freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c

Log:
fix mem leak

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	Sun Jan 20 17:39:08 2008
@@ -481,7 +481,7 @@
 							switch_xml_free(xml);
 						} else {
 							switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "XML ERROR!\n");
-							continue;
+							goto endloop;
 						}
 					}
 
@@ -496,6 +496,9 @@
 					switch_socket_send(listener->sock, listener->ebuf, &len);
 
 					switch_safe_free(listener->ebuf);
+					
+				endloop:
+					switch_event_destroy(&pevent);
 				}
 			}
 		}



More information about the Freeswitch-svn mailing list