[vlc-devel] commit: modules: Fix const char * usage and memory management. (Pierre d' Herbemont )
Rémi Denis-Courmont
rem at videolan.org
Wed Apr 16 16:14:22 CEST 2008
Le mercredi 16 avril 2008, git version control a écrit :
> /* We strdup() these entries so that they are still valid when
> the * module is unloaded. */
> - p_module->psz_object_name = strdup( p_module->psz_object_name );
> + /* This one is a (const char *) that will never get freed. */
Hum? If a shared object is unloaded, its constant data section may very
well be unmapped.
> + p_module->psz_object_name = p_module->psz_object_name;
Is this not a no-op???
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list