mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
5869f518cb
commit
29beea6462
2 changed files with 25 additions and 7 deletions
|
@ -937,6 +937,7 @@ keydb_release (KEYDB_HANDLE hd)
|
|||
}
|
||||
}
|
||||
|
||||
keyblock_cache_clear (hd);
|
||||
xfree (hd);
|
||||
}
|
||||
|
||||
|
@ -1387,8 +1388,11 @@ keydb_get_keyblock (KEYDB_HANDLE hd, KBNODE *ret_kb)
|
|||
hd->keyblock_cache.pk_no = pk_no;
|
||||
hd->keyblock_cache.uid_no = uid_no;
|
||||
}
|
||||
xfree (sigstatus);
|
||||
iobuf_close (iobuf);
|
||||
else
|
||||
{
|
||||
xfree (sigstatus);
|
||||
iobuf_close (iobuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue