diff options
author | julien.pierre.boogz%sun.com <devnull@localhost> | 2008-09-26 00:01:58 +0000 |
---|---|---|
committer | julien.pierre.boogz%sun.com <devnull@localhost> | 2008-09-26 00:01:58 +0000 |
commit | aa9d128f80cfe208c588d9be938e1c1d2a9c322c (patch) | |
tree | bd7efdd2fbde5833777a47ed67422d99ef716b55 | |
parent | 591845b408ba2cacf8cadfd3b67d4bc7f5cfc62b (diff) | |
download | nss-hg-aa9d128f80cfe208c588d9be938e1c1d2a9c322c.tar.gz |
Fix for bug 452751. Plug slot leak in PK11_FindSlotsByNames . r=nelson
-rw-r--r-- | security/nss/lib/pk11wrap/pk11slot.c | 5 |
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++; } } |