[svn-commits] file: trunk r59051 - /trunk/main/loader.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Mon Mar 19 15:32:40 MST 2007
Author: file
Date: Mon Mar 19 17:32:40 2007
New Revision: 59051
URL: http://svn.digium.com/view/asterisk?view=rev&rev=59051
Log:
It is possible for mod to become invalid after we unload it (if it's a dynamic module) so move it around a bit.
Modified:
trunk/main/loader.c
Modified: trunk/main/loader.c
URL: http://svn.digium.com/view/asterisk/trunk/main/loader.c?view=diff&rev=59051&r1=59050&r2=59051
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Mon Mar 19 17:32:40 2007
@@ -475,6 +475,9 @@
AST_LIST_UNLOCK(&module_list);
+ if (!error && !mod->lib)
+ mod->info->restore_globals();
+
#if LOADABLE_MODULES
if (!error)
unload_dynamic_module(mod);
@@ -482,9 +485,6 @@
if (!error)
ast_update_use_count();
-
- if (!error && !mod->lib)
- mod->info->restore_globals();
return res;
}
More information about the svn-commits
mailing list