diff options
author | Tobias Deiminger <tobias.deiminger@posteo.de> | 2023-01-04 21:26:12 +0100 |
---|---|---|
committer | Albert Astals Cid <tsdgeos@yahoo.es> | 2023-01-09 21:55:50 +0000 |
commit | 63bfacc89576345722cf3cefb962861aa7d159b8 (patch) | |
tree | 371dc96ab3924aa3491f44cb18bca4deac2c2444 | |
parent | 924ef4264cdb0eca97185d7fc1791bcf32279933 (diff) |
Fix "NSS could not shutdown"
SignatureHandler never freed it's signing certificate. This left
an internal NSS reference that prevented cleanup of the NSS cache,
causing "NSS could not shutdown".
NSS maintains an internal in-memory cache, where content is reference
counted. PK11_MakeCertFromHandle increases the issuerAndSn count.
CERT_DestroyCertificate decreases it. NSS tries to destruct the cache in
NSS_Shutdown, which we've scheduled with atexit. There it detects a
remaining reference.
Fixes #1326.
-rw-r--r-- | poppler/SignatureHandler.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/poppler/SignatureHandler.cc b/poppler/SignatureHandler.cc index 3cf40973..89bcc5dd 100644 --- a/poppler/SignatureHandler.cc +++ b/poppler/SignatureHandler.cc @@ -858,6 +858,10 @@ SignatureHandler::~SignatureHandler() HASH_Destroy(hash_context); } + if (signing_cert) { + CERT_DestroyCertificate(signing_cert); + } + free(temp_certs); } |