[vlc-devel] commit: modules: initialize return pointer to NULL (Jean-Paul Saman )
git version control
git at videolan.org
Thu Feb 19 18:23:02 CET 2009
vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Thu Feb 19 08:30:49 2009 +0100| [866faad67c52b93f57d1fc32fa155ca12828e869] | committer: Jean-Paul Saman
modules: initialize return pointer to NULL
If module_find() does not find the requested module it would return an uninitialized pointer. This made VLC webplugin crash under MacOS X. Thus make sure to initialize it properly to NULL.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=866faad67c52b93f57d1fc32fa155ca12828e869
---
src/modules/modules.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/modules/modules.c b/src/modules/modules.c
index 476809e..c1116de 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -683,7 +683,7 @@ void __module_unneed( vlc_object_t * p_this, module_t * p_module )
*/
module_t *module_find( const char * psz_name )
{
- module_t **list, *module;
+ module_t **list, *module = NULL;
list = module_list_get (NULL);
if (!list)
More information about the vlc-devel
mailing list