[vlc-commits] keystore/kwallet: free error if set
Filip Roséen
git at videolan.org
Thu May 18 17:52:01 CEST 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:01:57 2017 +0200| [de7f441a73ecbbdd6c98a9b45a5b1de0786465df] | committer: Rémi Denis-Courmont
keystore/kwallet: free error if set
If an error occurs leading up to the affected paths, the error-message
has to be freed in order to not leak allocated resources.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=de7f441a73ecbbdd6c98a9b45a5b1de0786465df
---
modules/keystore/kwallet.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/keystore/kwallet.c b/modules/keystore/kwallet.c
index 068970db3b..cffc63b680 100644
--- a/modules/keystore/kwallet.c
+++ b/modules/keystore/kwallet.c
@@ -508,6 +508,7 @@ kwallet_network_wallet( vlc_keystore* p_keystore )
{
msg_Err( p_keystore, "kwallet_network_wallet : "
"dbus_message_get_args failed\n%s", error.message );
+ dbus_error_free( &error );
goto end;
}
@@ -572,6 +573,7 @@ kwallet_is_enabled( vlc_keystore* p_keystore, int i_sid, bool* b_is_enabled )
{
msg_Err( p_keystore, "kwallet_is_enabled : "
"dbus_message_get_args failed\n%s", error.message );
+ dbus_error_free( &error );
goto end;
}
@@ -717,6 +719,7 @@ kwallet_has_folder( vlc_keystore* p_keystore, const char* psz_folder_name, bool
{
msg_Err( p_keystore, "kwallet_has_folder :"
" dbus_message_get_args failed\n%s", error.message );
+ dbus_error_free( &error );
goto end;
}
@@ -775,6 +778,7 @@ kwallet_create_folder( vlc_keystore* p_keystore, const char* psz_folder_name )
{
msg_Err( p_keystore, "kwallet_create_folder :"
" dbus_message_get_args failed\n%s", error.message );
+ dbus_error_free( &error );
goto end;
}
@@ -840,6 +844,7 @@ kwallet_open( vlc_keystore* p_keystore )
{
msg_Err( p_keystore, "kwallet_open :"
" dbus_message_get_args failed\n%s", error.message );
+ dbus_error_free( &error );
goto end;
}
p_sys->i_handle = ui_reply;
@@ -910,6 +915,7 @@ kwallet_has_entry( vlc_keystore* p_keystore, char* psz_entry_name, bool *b_has_e
{
msg_Err( p_keystore, "kwallet_has_entry :"
" dbus_message_get_args failed\n%s", error.message );
+ dbus_error_free( &error );
goto end;
}
*b_has_entry = b_reply;
@@ -967,6 +973,7 @@ kwallet_write_password( vlc_keystore* p_keystore, char* psz_entry_name, const ch
{
msg_Err( p_keystore, "kwallet_write_password :"
" dbus_message_get_args failed\n%s", error.message );
+ dbus_error_free( &error );
goto end;
}
@@ -1035,6 +1042,7 @@ kwallet_remove_entry( vlc_keystore* p_keystore, char* psz_entry_name )
{
msg_Err( p_keystore, "kwallet_remove entry :"
" dbus_message_get_args failed\n%s", error.message );
+ dbus_error_free( &error );
goto end;
}
More information about the vlc-commits
mailing list