summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulien.pierre.boogz%sun.com <devnull@localhost>2008-09-26 00:01:58 +0000
committerjulien.pierre.boogz%sun.com <devnull@localhost>2008-09-26 00:01:58 +0000
commitaa9d128f80cfe208c588d9be938e1c1d2a9c322c (patch)
treebd7efdd2fbde5833777a47ed67422d99ef716b55
parent591845b408ba2cacf8cadfd3b67d4bc7f5cfc62b (diff)
downloadnss-hg-aa9d128f80cfe208c588d9be938e1c1d2a9c322c.tar.gz
Fix for bug 452751. Plug slot leak in PK11_FindSlotsByNames . r=nelson
-rw-r--r--security/nss/lib/pk11wrap/pk11slot.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/security/nss/lib/pk11wrap/pk11slot.c b/security/nss/lib/pk11wrap/pk11slot.c
index c619ae003..15c5e561e 100644
--- a/security/nss/lib/pk11wrap/pk11slot.c
+++ b/security/nss/lib/pk11wrap/pk11slot.c
@@ -554,9 +554,8 @@ PK11_FindSlotsByNames(const char *dllName, const char* slotName,
(0==PORT_Strcmp(tmpSlot->token_name, tokenName)))) &&
( (!slotName) || (tmpSlot->slot_name &&
(0==PORT_Strcmp(tmpSlot->slot_name, slotName)))) ) {
- PK11SlotInfo* slot = PK11_ReferenceSlot(tmpSlot);
- if (slot) {
- PK11_AddSlotToList(slotList, slot);
+ if (tmpSlot) {
+ PK11_AddSlotToList(slotList, tmpSlot);
slotcount++;
}
}