From 28e9129eb86803288137ba2a01f02a5d95327666 Mon Sep 17 00:00:00 2001 From: raster Date: Thu, 10 Mar 2011 09:20:54 +0000 Subject: [PATCH] From: WooHyun Jung Subject: [E-devel] [Patch] small patch for elm_module I made a patch for elm_module. Null setting for freed pointer ~ git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@57660 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_module.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_module.c b/src/lib/elm_module.c index 3b7f5ff..e9f2b1c 100644 --- a/src/lib/elm_module.c +++ b/src/lib/elm_module.c @@ -176,8 +176,17 @@ _elm_module_unload(Elm_Module *m) eina_stringshare_del(m->data_dir); eina_stringshare_del(m->bin_dir); if (m->shutdown_func) m->shutdown_func(m); - if (m->api) free(m->api); - dlclose(m->handle); + if (m->api) + { + free(m->api); + m->api = NULL; + } + if (m->handle) + { + if (m->shutdown_func) m->shutdown_func(m); + dlclose(m->handle); + m->handle = NULL; + } } Elm_Module * -- 2.7.4