]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
rearrange a bit
authorMichael Jerris <mike@jerris.com>
Mon, 22 Jan 2007 17:16:25 +0000 (17:16 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 22 Jan 2007 17:16:25 +0000 (17:16 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4016 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core.c

index 8868a9c028c2952d89b082ce5a8c7c1951200a0a..eb2bc83c4975c6af87ca5f88bdf55b11af637072 100644 (file)
@@ -4237,13 +4237,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(int vg)
 
     switch_yield(1000000);
 
-       if (runtime.memory_pool) {
-               apr_pool_destroy(runtime.memory_pool);
-               if (!vg) {
-                       apr_terminate();
-               }
-       }
-
 #ifdef WIN32
        free(SWITCH_GLOBAL_dirs.base_dir);
        free(SWITCH_GLOBAL_dirs.mod_dir);
@@ -4256,6 +4249,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(int vg)
        free(SWITCH_GLOBAL_dirs.temp_dir);
 #endif
 
+       if (runtime.memory_pool) {
+               apr_pool_destroy(runtime.memory_pool);
+               if (!vg) {
+                       apr_terminate();
+               }
+       }
+
        return SWITCH_STATUS_SUCCESS;
 }