[Freeswitch-svn] [commit] r9977 - freeswitch/trunk/src/mod/applications/mod_commands

Freeswitch SVN mikej at freeswitch.org
Sat Oct 11 18:16:24 EDT 2008


Author: mikej
Date: Sat Oct 11 18:16:23 2008
New Revision: 9977

Modified:
   freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c

Log:
tweak

Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	Sat Oct 11 18:16:23 2008
@@ -256,15 +256,15 @@
 
 SWITCH_STANDARD_API(domain_exists_function)
 {
-	switch_xml_t root, domain;
+	switch_xml_t root = NULL, domain = NULL;
 	
 	if (!switch_strlen_zero(cmd)) {	
 		if (switch_xml_locate_domain(cmd, NULL, &root, &domain) == SWITCH_STATUS_SUCCESS) {
 			stream->write_function(stream, "true");
+			switch_xml_free(root); 
 		} else {
 			stream->write_function(stream, "false");
 		}
-		switch_xml_free(root); 
 	}
 	
 	return SWITCH_STATUS_SUCCESS;



More information about the Freeswitch-svn mailing list