[vlc-devel] commit: Fix NULL dereference (CID#149) ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Oct 5 16:11:35 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Oct  5 17:10:28 2008 +0300| [2d9ea592475df61b3733bf72a5b2f3f53b55753f] | committer: Rémi Denis-Courmont 

Fix NULL dereference (CID#149)

This bug can never happen, as we never call with pppsz_longname == NULL
at the moment.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d9ea592475df61b3733bf72a5b2f3f53b55753f
---

 src/modules/modules.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/modules/modules.c b/src/modules/modules.c
index f6d7fc3..2d0cb7b 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -736,7 +736,8 @@ char ** module_GetModulesNamesForCapability( const char *psz_capability,
     if( !psz_ret || ( pppsz_longname && *pppsz_longname == NULL ) )
     {
         free( psz_ret );
-        free( *pppsz_longname );
+        if( pppsz_longname )
+            free( *pppsz_longname );
         *pppsz_longname = NULL;
         module_list_free (list);
         return NULL;




More information about the vlc-devel mailing list