diff options
author | Werner Koch <wk@gnupg.org> | 2015-12-03 12:19:30 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-12-03 12:19:30 +0100 |
commit | 50a568e7380752454c029eac2b57d8803b1cb287 (patch) | |
tree | 5584ac4f506e9856aa51c8491e320a3291bc1501 /g10/keyserver.c | |
parent | gpg: Take care of keydb_new returning NULL. (diff) | |
download | gnupg2-50a568e7380752454c029eac2b57d8803b1cb287.tar.xz gnupg2-50a568e7380752454c029eac2b57d8803b1cb287.zip |
gpg: Make keyidlist more robust in case of errors.
* g10/keyserver.c (keyidlist): Clear *KLIST on error.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/keyserver.c')
-rw-r--r-- | g10/keyserver.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/keyserver.c b/g10/keyserver.c index e9de4962e..cf671c903 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -1346,7 +1346,10 @@ keyidlist(strlist_t users,KEYDB_SEARCH_DESC **klist,int *count,int fakev3) leave: if(rc) - xfree(*klist); + { + xfree(*klist); + *klist = NULL; + } xfree(desc); keydb_release(kdbhd); release_kbnode(keyblock); |