Closed Bug 587405 Opened 15 years ago Closed 15 years ago

PK11_ImportPublicKey leaks ckaId for unhandled pubKey->keyType

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: rrelyea)

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file)

98 PK11_ImportPublicKey(PK11SlotInfo *slot, SECKEYPublicKey *pubKey, 109 SECItem *ckaId = NULL; 136 if (isToken) { 137 ckaId = pk11_MakeIDFromPublicKey(pubKey); 147 switch (pubKey->keyType) { 225 default: 226 PORT_SetError( SEC_ERROR_BAD_KEY ); Event leaked_storage: Variable "ckaId" goes out of scope 227 return CK_INVALID_HANDLE; 228 } 238 if (ckaId) { 239 SECITEM_FreeItem(ckaId,PR_TRUE);
Attached patch patchSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #466129 - Flags: review?(nelson)
Comment on attachment 466129 [details] [diff] [review] patch Review requests for patches to pk11wrap and softoken should go to rrelyea
Attachment #466129 - Flags: review?(nelson) → review?(rrelyea)
Attachment #466129 - Flags: review?(rrelyea) → review+
taking bug until I check in patch
Assignee: timeless → rrelyea
Checking in pk11wrap/pk11akey.c; /cvsroot/mozilla/security/nss/lib/pk11wrap/pk11akey.c,v <-- pk11akey.c new revision: 1.31; previous revision: 1.30 done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: