diff options
author | wtc%netscape.com <devnull@localhost> | 2002-05-13 17:22:46 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-05-13 17:22:46 +0000 |
commit | db0d2cc00d6c51011e8061bd0600de601f0b8574 (patch) | |
tree | 5ad6ee9f822975231ce026dc72e8c789b88dcfd5 /security/nss/lib | |
parent | b4307dc7a4dc9c2388eb0cf466da736c44adbe6d (diff) | |
download | nss-hg-db0d2cc00d6c51011e8061bd0600de601f0b8574.tar.gz |
Bugzilla bug 135069: SEC_PKCS12DestroyExportContext should free the slot
reference allocated in SEC_PKCS12CreateExportContext. r=relyea,mcgreer.
Diffstat (limited to 'security/nss/lib')
-rw-r--r-- | security/nss/lib/pkcs12/p12e.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/nss/lib/pkcs12/p12e.c b/security/nss/lib/pkcs12/p12e.c index 0e393ed5e..1b86a49ac 100644 --- a/security/nss/lib/pkcs12/p12e.c +++ b/security/nss/lib/pkcs12/p12e.c @@ -194,7 +194,7 @@ SEC_PKCS12CreateExportContext(SECKEYGetPasswordKey pwfn, void *pwfnarg, p12ctxt->integrityEnabled = PR_FALSE; p12ctxt->arena = arena; p12ctxt->wincx = wincx; - p12ctxt->slot = (slot) ? slot : PK11_GetInternalSlot(); + p12ctxt->slot = (slot) ? PK11_ReferenceSlot(slot) : PK11_GetInternalSlot(); return p12ctxt; @@ -2147,6 +2147,8 @@ SEC_PKCS12DestroyExportContext(SEC_PKCS12ExportContext *p12ecx) } } + PK11_FreeSlot(p12ecx->slot); + PORT_FreeArena(p12ecx->arena, PR_TRUE); } |