g10: Fix memory leak.
authorJustus Winter <justus@g10code.com>
Tue, 15 Nov 2016 14:11:39 +0000 (15:11 +0100)
committerJustus Winter <justus@g10code.com>
Tue, 15 Nov 2016 14:38:09 +0000 (15:38 +0100)
commitd20107f6da094edd782947abb357abae5129a12c
tree97c85e02c1d5ed9c184862241191f83fb3568b18
parent1d03cc77e1706f7da653153ad4b58c61e4fd2573
g10: Fix memory leak.

* g10/getkey.c (finish_lookup): Clarify that we do not return a
reference.
(lookup): Clarify the relation between RET_KEYBLOCK and RET_FOUND_KEY.
Check arguments.  Actually release the node if it is not returned.

Signed-off-by: Justus Winter <justus@g10code.com>
g10/getkey.c