[vlc-commits] kwallet: Fix potential null dereference

Hugo Beauzée-Luyssen git at videolan.org
Tue Mar 20 10:49:20 CET 2018


vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Mar 19 18:19:38 2018 +0100| [38c72c90ffb181a412431655fc8b51f5439c3edb] | committer: Hugo Beauzée-Luyssen

kwallet: Fix potential null dereference

CID #1372923

(cherry picked from commit f0b2d7d703f2a2dc7c7f0d09f9ce86681035106a)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=38c72c90ffb181a412431655fc8b51f5439c3edb
---

 modules/keystore/kwallet.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/keystore/kwallet.c b/modules/keystore/kwallet.c
index ff6131796d..06ea021293 100644
--- a/modules/keystore/kwallet.c
+++ b/modules/keystore/kwallet.c
@@ -1181,7 +1181,8 @@ kwallet_read_password_list( vlc_keystore* p_keystore, char* psz_entry_name,
 error:
     free( p_secret_decoded );
     *pi_count = 0;
-    vlc_keystore_release_entries( p_entries, i );
+    if ( p_entries )
+        vlc_keystore_release_entries( p_entries, i );
     if ( msg )
         dbus_message_unref( msg );
     if ( repmsg )



More information about the vlc-commits mailing list