Closed Bug 410226 Opened 17 years ago Closed 16 years ago

leak in create_objects_from_handles

Categories

(NSS :: Libraries, defect, P3)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nelson, Assigned: julien.pierre)

Details

(Keywords: memory-leak)

Attachments

(1 file)

Function create_objects_from_handles allocates an array of pointers
whose address is kept in the variable "objects".  Then after that array 
is allocated, it tries to fill in the array with values of other allocated
objects.  If any of the allocation attempts fails, it frees all the previously
allocated objects, but does not free the array of object pointers.  It leaks
the array named "objects".
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → julien.pierre.boogz
Priority: -- → P3
Target Milestone: --- → 3.12
Status: NEW → ASSIGNED
Attached patch Fix leakSplinter Review
Attachment #301437 - Flags: review?(nelson)
Comment on attachment 301437 [details] [diff] [review]
Fix leak

I guess this is the right free routine for "objects".  Not sure.
Attachment #301437 - Flags: review?(nelson) → review+
Nelson,

Thanks for the review. It is the right routine. You can find examples in the same source file of other objectHandles arrays allocated with nss_ZNEWARRAY and freed with nss_ZFreeIf.

I checked this in to the trunk.

Checking in devtoken.c;
/cvsroot/mozilla/security/nss/lib/dev/devtoken.c,v  <--  devtoken.c
new revision: 1.43; previous revision: 1.42
done
Status: ASSIGNED → RESOLVED
Closed: 16 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: