Closed
Bug 464159
Opened 16 years ago
Closed 15 years ago
Quickstubs leaks IIDs
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: sayrer, Assigned: sayrer)
Details
(Keywords: fixed1.9.1)
Attachments
(1 file, 1 obsolete file)
1.82 KB,
patch
|
jorendorff
:
review+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
LookupInterfaceOrAncestor needs to free the variable "piid"
Assignee | ||
Comment 1•16 years ago
|
||
valgrind says this fixes most of the leaks, but not all. That's confusing, because I'm not sure how it could still leak.
Attachment #347467 -
Flags: review?(jorendorff)
Comment 2•16 years ago
|
||
I think valgrind is right. GetInterfaceIID is called within the loop, so it could be called several times. So the Free call needs to be inside the loop as well, right? if(NS_FAILED(info->GetParent(getter_AddRefs(parent))) || !parent || NS_FAILED(parent->GetInterfaceIID(&piid))) { break; } p = LookupEntry(tableSize, table, *piid); + nsMemory::Free(piid); if(p) break; No need to initialize piid to null; it could be moved inside the loop though. Also feel free to rename "p" to "entry" or something. I don't know what I was thinking. :-\
Comment 3•16 years ago
|
||
Or better yet, use GetIIDShared and avoid the allocation/free pair altogether.
Assignee | ||
Comment 4•16 years ago
|
||
(In reply to comment #2) > I think valgrind is right. GetInterfaceIID is called within the loop, so it > could be called several times. So the Free call needs to be inside the loop as > well, right? Oh, duh, yeah. I'll get something going incorporating Benjamin's suggestion.
Updated•16 years ago
|
Attachment #347467 -
Flags: review?(jorendorff)
Assignee | ||
Comment 5•16 years ago
|
||
Attachment #347467 -
Attachment is obsolete: true
Attachment #348237 -
Flags: review?(jorendorff)
Comment 6•16 years ago
|
||
Comment on attachment 348237 [details] [diff] [review] use GetIIDShared Looks good.
Attachment #348237 -
Flags: review?(jorendorff) → review+
Assignee | ||
Updated•16 years ago
|
Attachment #348237 -
Flags: approval1.9.1?
Updated•16 years ago
|
Attachment #348237 -
Flags: approval1.9.1? → approval1.9.1+
Comment 7•16 years ago
|
||
Comment on attachment 348237 [details] [diff] [review] use GetIIDShared a191=beltzner
Assignee | ||
Comment 8•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c78fb7914c0c
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: blocking1.9.1+
Priority: -- → P2
Updated•15 years ago
|
Assignee: nobody → sayrer
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
Comment 9•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/d5a2ce166acf
Keywords: fixed1.9.1
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•