Closed
Bug 866363
Opened 8 years ago
Closed 8 years ago
SECITEM_FreeArray needs to free array->items
Categories
(NSS :: Libraries, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
3.15
People
(Reporter: wtc, Assigned: wtc)
References
Details
(Keywords: memory-leak)
Attachments
(1 file)
2.28 KB,
patch
|
ryan.sleevi
:
review+
KaiE
:
superreview+
wtc
:
checked-in+
|
Details | Diff | Splinter Review |
SECITEM_FreeArray needs to free array->items. I suggest the following fix in secitem_FreeArray: for (i=0; i<array->len; ++i) { SECItem *item = &array->items[i]; ... } + + PORT_Free(array->items); + array->items = NULL; + array->len = 0; if (freeit) PORT_Free(array);
Assignee | ||
Comment 1•8 years ago
|
||
Fix the memory leak of array->items in secitem_FreeArray. Mark secitem_FreeArray as static. Don't need to include "base64.h".
Assignee: kaie → wtc
Attachment #743381 -
Flags: superreview?(kaie)
Attachment #743381 -
Flags: review?(ryan.sleevi)
Updated•8 years ago
|
Attachment #743381 -
Flags: review?(ryan.sleevi) → review+
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 743381 [details] [diff] [review] Patch https://hg.mozilla.org/projects/nss/rev/b3a240eef440
Attachment #743381 -
Flags: checked-in+
Assignee | ||
Updated•8 years ago
|
Comment 3•8 years ago
|
||
Comment on attachment 743381 [details] [diff] [review] Patch Thank you!
Attachment #743381 -
Flags: superreview?(kaie) → superreview+
You need to log in
before you can comment on or make changes to this bug.
Description
•