Closed
Bug 439266
Opened 16 years ago
Closed 16 years ago
Leak of array if rv != NS_OK in BuildSearchElements()
Categories
(MailNews Core :: Address Book, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9.1a1
People
(Reporter: hwaara, Assigned: hwaara)
Details
(Keywords: memory-leak)
Attachments
(1 file, 1 obsolete file)
1.44 KB,
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
BuildSearchElements() in nsAbOSXDirectory.mm will leak an NSArray and all its items if it's returning early with NS_ENSURE_SUCCESS(rv, rv). Fix coming up.
Assignee | ||
Comment 1•16 years ago
|
||
Fix to make sure we always escape from the loop (instead of returning early) on error.
Attachment #325130 -
Flags: review?(bugzilla)
Comment 2•16 years ago
|
||
Comment on attachment 325130 [details] [diff] [review] Fix v1 if (!aCanHandle) { - return NS_OK; + rv = NS_OK; + break; } The way I read this, we'll be processing the if (array) statement below in the !aCanHandle case, whereas we wouldn't have before. I don't think that matters, but could you see if you agree, and if so, please could you add some comments onto BuildSearchElements stating that if aCanHandle is false, the result should be ignored?
Attachment #325130 -
Flags: review?(bugzilla) → review-
Assignee | ||
Comment 3•16 years ago
|
||
Attachment #325130 -
Attachment is obsolete: true
Attachment #326695 -
Flags: review?(bugzilla)
Updated•16 years ago
|
Attachment #326695 -
Flags: review?(bugzilla) → review+
Assignee | ||
Comment 4•16 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Hardware: PC → All
Target Milestone: --- → mozilla1.9.1a1
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•