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 <justus@g10code.com>
This commit is contained in:
Justus Winter 2015-11-19 16:18:20 +01:00
parent eb957ffc47
commit a1650b1edf
1 changed files with 1 additions and 1 deletions

View File

@ -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;