[Freeswitch-svn] [commit] r5598 - freeswitch/trunk/src/mod/xml_int/mod_xml_curl

Freeswitch SVN anthm at freeswitch.org
Mon Aug 13 19:50:01 EDT 2007


Author: anthm
Date: Mon Aug 13 19:50:01 2007
New Revision: 5598

Modified:
   freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c

Log:
fix small unlikely but still possible bugs

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c	Mon Aug 13 19:50:01 2007
@@ -164,7 +164,7 @@
 
 	if (!(bindings_tag = switch_xml_child(cfg, "bindings"))) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing <bindings> tag!\n");
-		return SWITCH_STATUS_FALSE;
+		goto done;
 	}
 
 	for (binding_tag = switch_xml_child(bindings_tag, "binding"); binding_tag; binding_tag = binding_tag->next) {
@@ -195,7 +195,7 @@
 		}
 
 		if (!(binding = malloc(sizeof(*binding)))) {
-			return SWITCH_STATUS_FALSE;
+			goto done;
 		}
 		memset(binding, 0, sizeof(*binding));
 
@@ -218,6 +218,7 @@
 		binding = NULL;
 	}
 
+ done:
 	switch_xml_free(xml);
 
 	return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;



More information about the Freeswitch-svn mailing list