diff options
author | Werner Koch <wk@gnupg.org> | 2018-10-24 20:22:17 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-10-24 20:22:17 +0200 |
commit | bafcf7095159493a656382997f8b0d0bb11a20e8 (patch) | |
tree | 44e16409513af4633cd8ca4033f65ee52f0e7424 /common/simple-pwquery.c | |
parent | agent: Fix possible release of unitialize var in a genkey error case. (diff) | |
download | gnupg2-bafcf7095159493a656382997f8b0d0bb11a20e8.tar.xz gnupg2-bafcf7095159493a656382997f8b0d0bb11a20e8.zip |
agent: Fix possible uninitalized use of CTX in simple_pwquery.
* common/simple-pwquery.c (agent_open): Clear CTX even on early error.
--
GnuPG-bug-id: 4223
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'common/simple-pwquery.c')
-rw-r--r-- | common/simple-pwquery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c index e7f4af341..b8ada4214 100644 --- a/common/simple-pwquery.c +++ b/common/simple-pwquery.c @@ -246,6 +246,7 @@ agent_open (assuan_context_t *ctx) #ifdef SPWQ_USE_LOGGING log_error (_("no gpg-agent running in this session\n")); #endif + *ctx = NULL; return SPWQ_NO_AGENT; } |