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

git version control git at videolan.org
Mon Oct 6 15:46:45 CEST 2008


vlc | branch: 0.9-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Oct  5 17:10:28 2008 +0300| [8dc2c568e4c90a92ffbbc25a3889cb60d37692e3] | committer: Derk-Jan Hartman 

Fix NULL dereference (CID#149)

This bug can never happen, as we never call with pppsz_longname == NULL
at the moment.
(cherry picked from commit 2d9ea592475df61b3733bf72a5b2f3f53b55753f)

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

 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 9ff601b..f2d2fa3 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -770,7 +770,8 @@ char ** __module_GetModulesNamesForCapability( vlc_object_t *p_this,
     if( !psz_ret || ( pppsz_longname && *pppsz_longname == NULL ) )
     {
         free( psz_ret );
-        free( *pppsz_longname );
+        if( pppsz_longname )
+            free( *pppsz_longname );
         *pppsz_longname = NULL;
         vlc_list_release( p_list );
         return NULL;




More information about the vlc-devel mailing list