curl/curl-7.19.5-cc_refcnt-2.patch
2009-07-10 12:45:41 +00:00

21 lines
653 B
Diff

diff -ruNp curl-7.19.5.orig/lib/nss.c curl-7.19.5/lib/nss.c
--- curl-7.19.5.orig/lib/nss.c 2009-07-10 14:41:55.890168660 +0200
+++ curl-7.19.5/lib/nss.c 2009-07-10 14:42:18.966293110 +0200
@@ -857,8 +857,15 @@ void Curl_nss_cleanup(void)
*/
PR_Lock(nss_initlock);
if (initialized) {
- if(mod)
+ /* Free references to client certificates held in the SSL session cache.
+ * Omitting this hampers destruction of the security module owning
+ * the certificates. */
+ SSL_ClearSessionCache();
+
+ if(mod) {
+ SECMOD_UnloadUserModule(mod);
SECMOD_DestroyModule(mod);
+ }
mod = NULL;
NSS_Shutdown();
}