]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorMichael Jerris <mike@jerris.com>
Sat, 11 Oct 2008 22:16:23 +0000 (22:16 +0000)
committerMichael Jerris <mike@jerris.com>
Sat, 11 Oct 2008 22:16:23 +0000 (22:16 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9977 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_commands/mod_commands.c

index 9d05bc0a1e8c2dbd6c7d6b46c93528b940d7656d..b29eab3d054476492dd47ad75732ac80af9d873b 100644 (file)
@@ -256,15 +256,15 @@ SWITCH_STANDARD_API(module_exists_function)
 
 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;