From a1650b1edf80c2526c0576547b3a574e8d30f1fa Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 19 Nov 2015 16:18:20 +0100 Subject: [PATCH] agent: Improve error handling. * agent/trustlist.c (istrusted_internal): Initialize 'err'. -- There is a plausible path of execution so that a branch condition uses the uninitialized value. Found using the Clang Static Analyzer. Signed-off-by: Justus Winter --- agent/trustlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/trustlist.c b/agent/trustlist.c index 175ebe44d..af5f64570 100644 --- a/agent/trustlist.c +++ b/agent/trustlist.c @@ -398,7 +398,7 @@ static gpg_error_t istrusted_internal (ctrl_t ctrl, const char *fpr, int *r_disabled, int already_locked) { - gpg_error_t err; + gpg_error_t err = 0; int locked = already_locked; trustitem_t *ti; size_t len;