Closed Bug 345775 Opened 19 years ago Closed 19 years ago

blapitest.c doesn't completely free the SECItem allocated in getECParams

Categories

(NSS :: Test, defect)

3.11
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Unassigned)

Details

Attachments

(1 file)

In blapitest.c, the function getECParams allocates and returns a SECItem as follows: ecparams = SECITEM_AllocItem(NULL, NULL, (2 + oidData->oid.len)); ... return ecparams; But this SECItem is freed with a simple free() call: tmpECParamsDER = getECParams(curveName); ... free(tmpECParamsDER); So, the memory that tmpECParamsDER->data points to is leaked.
Attached patch Proposed patchSplinter Review
Attachment #230484 - Flags: review?(alexei.volkov.bugs)
Comment on attachment 230484 [details] [diff] [review] Proposed patch r=alexei.volkov.bugs
Attachment #230484 - Flags: review?(alexei.volkov.bugs) → review+
I checked in the proposed patch on the NSS trunk for NSS 3.12. Checking in blapitest.c; /cvsroot/mozilla/security/nss/cmd/bltest/blapitest.c,v <-- blapitest.c new revision: 1.49; previous revision: 1.48 done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: