gpg: Make keyidlist more robust in case of errors.
authorWerner Koch <wk@gnupg.org>
Thu, 3 Dec 2015 11:19:30 +0000 (12:19 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 3 Dec 2015 11:19:30 +0000 (12:19 +0100)
* g10/keyserver.c (keyidlist): Clear *KLIST on error.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/keyserver.c

index e9de496..cf671c9 100644 (file)
@@ -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);