[vlc-commits] kwallet: Fix leak on error
Hugo Beauzée-Luyssen
git at videolan.org
Thu Aug 3 16:22:38 CEST 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Aug 3 15:55:40 2017 +0200| [696d0172a62d10f9d13c5dad56d388311aac8eb6] | committer: Hugo Beauzée-Luyssen
kwallet: Fix leak on error
CID #1372939
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=696d0172a62d10f9d13c5dad56d388311aac8eb6
---
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 cffc63b680..ae1aacb8ad 100644
--- a/modules/keystore/kwallet.c
+++ b/modules/keystore/kwallet.c
@@ -1071,7 +1071,7 @@ kwallet_read_password_list( vlc_keystore* p_keystore, char* psz_entry_name,
DBusMessageIter var_iter;
vlc_keystore_entry* p_entries = NULL;
size_t i_size;
- uint8_t* p_secret_decoded;
+ uint8_t* p_secret_decoded = NULL;
char* p_reply;
char* p_secret;
int i = 0;
@@ -1179,6 +1179,7 @@ kwallet_read_password_list( vlc_keystore* p_keystore, char* psz_entry_name,
return p_entries;
error:
+ free( p_secret_decoded );
*pi_count = 0;
vlc_keystore_release_entries( p_entries, i );
if ( msg )
More information about the vlc-commits
mailing list