[vlc-commits] keystore/kwallet: fix memory-leak in vlc_dbus_init
Filip Roséen
git at videolan.org
Mon Sep 26 09:05:21 CEST 2016
vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Sep 26 02:41:21 2016 +0200| [2feb0e80afad2717c62d9f05b06bc60c6d3bce12] | committer: Thomas Guillem
keystore/kwallet: fix memory-leak in vlc_dbus_init
Previously the function would fail to release acquired resources upon
failure, these changes make sure that we do not leak allocated memory
when this happens.
fixes #17442
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2feb0e80afad2717c62d9f05b06bc60c6d3bce12
---
modules/keystore/kwallet.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/keystore/kwallet.c b/modules/keystore/kwallet.c
index 2fa4a50..5ab8aeb 100644
--- a/modules/keystore/kwallet.c
+++ b/modules/keystore/kwallet.c
@@ -667,6 +667,7 @@ vlc_dbus_init( vlc_keystore* p_keystore )
return VLC_SUCCESS;
error:
+ FREENULL( p_sys->psz_app_id );
dbus_connection_close( p_sys->connection );
dbus_connection_unref( p_sys->connection );
return VLC_EGENERIC;
More information about the vlc-commits
mailing list