From e17fed3ada2b040e73ba707c0cf8dfbe2431bdbd Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 13 Aug 2007 23:50:01 +0000 Subject: [PATCH] fix small unlikely but still possible bugs git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5598 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/xml_int/mod_xml_curl/mod_xml_curl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c index d61941d525..957435cc36 100644 --- a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c +++ b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c @@ -164,7 +164,7 @@ static switch_status_t do_config(void) if (!(bindings_tag = switch_xml_child(cfg, "bindings"))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing 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 @@ static switch_status_t do_config(void) } if (!(binding = malloc(sizeof(*binding)))) { - return SWITCH_STATUS_FALSE; + goto done; } memset(binding, 0, sizeof(*binding)); @@ -218,6 +218,7 @@ static switch_status_t do_config(void) binding = NULL; } + done: switch_xml_free(xml); return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;