aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-10-24 18:22:17 +0000
committerWerner Koch <[email protected]>2018-10-24 18:22:17 +0000
commitbafcf7095159493a656382997f8b0d0bb11a20e8 (patch)
tree44e16409513af4633cd8ca4033f65ee52f0e7424
parentagent: Fix possible release of unitialize var in a genkey error case. (diff)
downloadgnupg-bafcf7095159493a656382997f8b0d0bb11a20e8.tar.gz
gnupg-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 <[email protected]>
-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;
}