[vlc-devel] commit: Fix leaking of psz_object_name ( Rafaël Carré )
git version control
git at videolan.org
Mon May 5 11:09:48 CEST 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon May 5 11:10:48 2008 +0200| [f0f97b4eff1d9327c812546d23d8472f66374c89]
Fix leaking of psz_object_name
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f0f97b4eff1d9327c812546d23d8472f66374c89
---
src/modules/cache.c | 1 +
src/modules/modules.c | 1 -
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/modules/cache.c b/src/modules/cache.c
index 4e96d48..61c6074 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -265,6 +265,7 @@ void CacheLoad( vlc_object_t *p_this )
pp_cache[i]->p_module = vlc_module_create( p_this );
/* Load additional infos */
+ free( pp_cache[i]->p_module->psz_object_name );
LOAD_STRING( pp_cache[i]->p_module->psz_object_name );
LOAD_STRING( pp_cache[i]->p_module->psz_shortname );
LOAD_STRING( pp_cache[i]->p_module->psz_longname );
diff --git a/src/modules/modules.c b/src/modules/modules.c
index dfd51d4..af619a5 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -1312,7 +1312,6 @@ static void DupModule( module_t *p_module )
/* 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 );
p_module->psz_capability = strdup( p_module->psz_capability );
p_module->psz_shortname = p_module->psz_shortname ?
strdup( p_module->psz_shortname ) : NULL;
More information about the vlc-devel
mailing list