diff options
author | Justus Winter <[email protected]> | 2015-11-19 15:18:20 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2015-11-19 15:18:20 +0000 |
commit | a1650b1edf80c2526c0576547b3a574e8d30f1fa (patch) | |
tree | 5f55b660ed42f664ecb9aa869fb99eb16bc27ea1 /agent/trustlist.c | |
parent | common: Avoid undefined behavior. (diff) | |
download | gnupg-a1650b1edf80c2526c0576547b3a574e8d30f1fa.tar.gz gnupg-a1650b1edf80c2526c0576547b3a574e8d30f1fa.zip |
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 <[email protected]>
Diffstat (limited to 'agent/trustlist.c')
-rw-r--r-- | agent/trustlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |