]> git.sesse.net Git - vlc/commitdiff
modules: initialize return pointer to NULL
authorJean-Paul Saman <jpsaman@videolan.org>
Thu, 19 Feb 2009 07:30:49 +0000 (08:30 +0100)
committerJean-Paul Saman <jpsaman@videolan.org>
Thu, 19 Feb 2009 17:22:53 +0000 (18:22 +0100)
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.

src/modules/modules.c

index 476809e4c6ac9727b4e536cecc05a860c03323ee..c1116dee7d96fc5d39f94220827edee57bdc96c7 100644 (file)
@@ -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)