Closed
Bug 410226
Opened 17 years ago
Closed 17 years ago
leak in create_objects_from_handles
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
3.12
People
(Reporter: nelson, Assigned: julien.pierre)
Details
(Keywords: memory-leak)
Attachments
(1 file)
|
526 bytes,
patch
|
nelson
:
review+
|
Details | Diff | Splinter Review |
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".
| Assignee | ||
Updated•17 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Updated•17 years ago
|
Assignee: nobody → julien.pierre.boogz
Priority: -- → P3
Target Milestone: --- → 3.12
| Assignee | ||
Updated•17 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•17 years ago
|
||
Attachment #301437 -
Flags: review?(nelson)
| Reporter | ||
Comment 2•17 years ago
|
||
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+
| Assignee | ||
Comment 3•17 years ago
|
||
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: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•