summaryrefslogtreecommitdiffstats
path: root/common/simple-pwquery.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-10-24 20:22:17 +0200
committerWerner Koch <wk@gnupg.org>2018-10-24 20:22:17 +0200
commitbafcf7095159493a656382997f8b0d0bb11a20e8 (patch)
tree44e16409513af4633cd8ca4033f65ee52f0e7424 /common/simple-pwquery.c
parentagent: Fix possible release of unitialize var in a genkey error case. (diff)
downloadgnupg2-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.c1
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;
}