gpg: Correctly handle an error.

* g10/keyring.c (keyring_search): If a compare function returns an
error, treat it as an error.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
Neal H. Walfield 2015-11-17 12:56:55 +01:00
parent ad9befab12
commit 848726f5c0
1 changed files with 3 additions and 0 deletions

View File

@ -1202,6 +1202,9 @@ keyring_search (KEYRING_HANDLE hd, KEYDB_SEARCH_DESC *desc,
free_packet (&pkt);
continue;
found:
if (rc)
goto real_found;
if (DBG_LOOKUP)
log_debug ("%s: packet starting at offset %zx matched descriptor %zd\n",
__func__, offset, n);