diff options
Diffstat (limited to 'g10/keyring.c')
| -rw-r--r-- | g10/keyring.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/g10/keyring.c b/g10/keyring.c index fd0b83521..f52bb7aea 100644 --- a/g10/keyring.c +++ b/g10/keyring.c @@ -253,6 +253,14 @@ keyring_new (void *token) } void +keyring_fp_close (KEYRING_HANDLE hd) +{ + if (!hd) + return; + iobuf_close (hd->current.iobuf); +} + +void keyring_release (KEYRING_HANDLE hd) { if (!hd) @@ -261,7 +269,6 @@ keyring_release (KEYRING_HANDLE hd) active_handles--; xfree (hd->word_match.name); xfree (hd->word_match.pattern); - iobuf_close (hd->current.iobuf); xfree (hd); } @@ -1594,6 +1601,7 @@ keyring_rebuild_cache (ctrl_t ctrl, void *token, int noisy) xfree (tmpfilename); xfree (bakfilename); release_kbnode (keyblock); + keyring_fp_close (hd); keyring_lock (hd, 0); keyring_release (hd); return rc; |
