mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
agent: Fix an error path of agent_get_confirmation.
* agent/call-pinentry.c (agent_get_confirmation): Make sure unlock_pinentry is always called. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
f588dd8d17
commit
bb82ad018a
@ -1481,15 +1481,16 @@ agent_get_confirmation (ctrl_t ctrl,
|
||||
npth_t thread;
|
||||
|
||||
rc = watch_sock_start (&sock_watched, &thread);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (!rc)
|
||||
{
|
||||
rc = assuan_transact (entry_ctx, "CONFIRM",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
if (rc && gpg_err_source (rc) && gpg_err_code (rc) == GPG_ERR_ASS_CANCELED)
|
||||
if (rc && gpg_err_source (rc)
|
||||
&& gpg_err_code (rc) == GPG_ERR_ASS_CANCELED)
|
||||
rc = gpg_err_make (gpg_err_source (rc), GPG_ERR_CANCELED);
|
||||
|
||||
watch_sock_end (&sock_watched, &thread);
|
||||
}
|
||||
|
||||
return unlock_pinentry (ctrl, rc);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user