[vlc-devel] [PATCH] keystore/kwallet: fix memory-leak in vlc_dbus_init
Filip Roséen
filip at atch.se
Mon Sep 26 02:41:21 CEST 2016
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
---
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;
--
2.10.0
More information about the vlc-devel
mailing list