From babb8b31e89141157441d823b335af6949db8111 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Tue, 16 Apr 2002 22:40:07 +0000 Subject: [PATCH] Bugzilla bug 133584: PK11_SaveSMimeProfile also needs to free free_slot if it returns on error. --- security/nss/lib/pk11wrap/pk11cert.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/security/nss/lib/pk11wrap/pk11cert.c b/security/nss/lib/pk11wrap/pk11cert.c index 0addf8e7451..c4cdca5c2c7 100644 --- a/security/nss/lib/pk11wrap/pk11cert.c +++ b/security/nss/lib/pk11wrap/pk11cert.c @@ -3918,6 +3918,9 @@ PK11_SaveSMimeProfile(PK11SlotInfo *slot, char *emailAddr, SECItem *derSubj, rwsession = PK11_GetRWSession(slot); if (rwsession == CK_INVALID_SESSION) { PORT_SetError(SEC_ERROR_READ_ONLY); + if (free_slot) { + PK11_FreeSlot(free_slot); + } return SECFailure; }