diff options
author | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2019-09-05 18:38:01 +0200 |
---|---|---|
committer | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2019-09-05 18:42:26 +0200 |
commit | aae0329ba3eb260e8094388b49e14b8cf42ea91e (patch) | |
tree | fffab43a70d2b5e42388fde4cfe7f7eebdb145ae /libsecret | |
parent | be541cf9d4a81b97f55794a5b1de50f92aac1fbb (diff) | |
download | libsecret-aae0329ba3eb260e8094388b49e14b8cf42ea91e.tar.gz |
service: Fix secret_service_ensure_session_finish error propagation
The condition checking g_task_is_valid was inverted, resulting in errors
being ignored.
Move the check to a g_return_val_if_fail to be in line with all other
uses of g_task_is_valid.
Fixes https://bugs.archlinux.org/task/63666
Diffstat (limited to 'libsecret')
-rw-r--r-- | libsecret/secret-service.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libsecret/secret-service.c b/libsecret/secret-service.c index 6c89bb8..6dea0d1 100644 --- a/libsecret/secret-service.c +++ b/libsecret/secret-service.c @@ -1321,12 +1321,11 @@ secret_service_ensure_session_finish (SecretService *self, { g_return_val_if_fail (SECRET_IS_SERVICE (self), FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + g_return_val_if_fail (g_task_is_valid (result, self), FALSE); - if (!g_task_is_valid (result, self)) { - if (!g_task_propagate_boolean (G_TASK (result), error)) { - _secret_util_strip_remote_error (error); - return FALSE; - } + if (!g_task_propagate_boolean (G_TASK (result), error)) { + _secret_util_strip_remote_error (error); + return FALSE; } g_return_val_if_fail (self->pv->session != NULL, FALSE); |