g10: Fix keybox-related memory leaks.
authorJustus Winter <justus@g10code.com>
Thu, 30 Jun 2016 15:09:59 +0000 (17:09 +0200)
committerJustus Winter <justus@g10code.com>
Thu, 30 Jun 2016 16:50:16 +0000 (18:50 +0200)
commit29beea6462cca32d3278b0f7f9364ff4342327b8
treebd80e409c597e0620dbc1d9be5da380a17e8e1e8
parent5869f518cbd8b41b4c9880fc593216b9efeea430
g10: Fix keybox-related memory leaks.

* g10/keydb.c (keydb_release): Clear keyblock cache.
(keydb_get_keyblock): Revert previous change.
* kbx/keybox-blob.c (create_blob_finish): Free previous buffer, free
fixups after applying them.
(_keybox_release_blob): Free buffer.  Currently, the buffer has been
extracted before the keybox is released, but this is the right thing
to do here.

Fixes-commit: c57501cc
Signed-off-by: Justus Winter <justus@g10code.com>
g10/keydb.c
kbx/keybox-blob.c