No reason ! Just my mistake - T-T
I re-made the patch , thanks for nice checking.
-----Original Message-----
From: Daniel Juyung Seo [mailto:[email protected]]
Sent: Thursday, March 03, 2011 3:57 PM
To: WooHyun Jung
Cc: [email protected]
Subject: Re: [E-devel] [Patch] small patch for elm_module
if (m->shutdown_func) m->shutdown_func(m);
...
+ if (m->handle)
+ {
+ if (m->shutdown_func) m->shutdown_func(m);
+ dlclose(m->handle);
+ m->handle = NULL;
+ }
Any reason to do m->shutdown_func() twice?
Thanks.
Daniel Juyung Seo (SeoZ)
On Thu, Mar 3, 2011 at 2:13 AM, WooHyun Jung <[email protected]>
wrote:
> Hello. All ~
>
>
>
> I made a patch for elm_module.
>
> Null setting for freed pointer ~
>
>
>
> Can anybody check about this ?
>
> Thanks.
>
>
> ----------------------------------------------------------------------
> -------- Free Software Download: Index, Search & Analyze Logs and
> other IT data in Real-Time with Splunk. Collect, index and harness all
> the fast moving IT data generated by your applications, servers and
> devices whether physical, virtual or in the cloud. Deliver compliance
> at lower cost and gain new business insights.
> http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
Index: src/lib/elm_module.c
===================================================================
--- src/lib/elm_module.c (revision 57211)
+++ src/lib/elm_module.c (working copy)
@@ -175,9 +175,17 @@ _elm_module_unload(Elm_Module *m)
eina_stringshare_del(m->so_path);
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 *
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel