diff options
author | Justus Winter <justus@g10code.com> | 2016-06-28 18:02:10 +0200 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2016-06-28 18:21:50 +0200 |
commit | c57501cc5fa84dbaf560c0fc18853c9540e918af (patch) | |
tree | 2652d0823dd3fb2c5408d3ba876683a0d3aa3a87 /g10/keydb.c | |
parent | common: Fix memory leaks. (diff) | |
download | gnupg2-c57501cc5fa84dbaf560c0fc18853c9540e918af.tar.xz gnupg2-c57501cc5fa84dbaf560c0fc18853c9540e918af.zip |
g10: Fix memory leaks.
* g10/keydb.c (keydb_get_keyblock): Free 'sigstatus' and 'iobuf'.
* g10/t-keydb-get-keyblock.c: Fix trivial memory leaks.
* g10/t-keydb.c: Likewise.
Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'g10/keydb.c')
-rw-r--r-- | g10/keydb.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/g10/keydb.c b/g10/keydb.c index 17ddd5d20..c483bb138 100644 --- a/g10/keydb.c +++ b/g10/keydb.c @@ -1387,11 +1387,8 @@ keydb_get_keyblock (KEYDB_HANDLE hd, KBNODE *ret_kb) hd->keyblock_cache.pk_no = pk_no; hd->keyblock_cache.uid_no = uid_no; } - else - { - xfree (sigstatus); - iobuf_close (iobuf); - } + xfree (sigstatus); + iobuf_close (iobuf); } } break; |