Commit 2feb0e80 authored by Filip Roséen's avatar Filip Roséen Committed by 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's avatarThomas Guillem <thomas@gllm.fr>
parent 9eb3099e
...@@ -667,6 +667,7 @@ vlc_dbus_init( vlc_keystore* p_keystore ) ...@@ -667,6 +667,7 @@ vlc_dbus_init( vlc_keystore* p_keystore )
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
FREENULL( p_sys->psz_app_id );
dbus_connection_close( p_sys->connection ); dbus_connection_close( p_sys->connection );
dbus_connection_unref( p_sys->connection ); dbus_connection_unref( p_sys->connection );
return VLC_EGENERIC; return VLC_EGENERIC;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment