Closed Bug 333733 Opened 19 years ago Closed 19 years ago

Could leak attr in nsFrameUtil::Tag::ReadAttrs

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jwatt, Assigned: jwatt)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file)

Actually it looks like nsFrameUtil is dead:

http://lxr.mozilla.org/seamonkey/search?string=nsFrameUtil

Is that the case? If not, then there are other questions, such as why do we AddAttr for value==nsnull due to initialization, but not for it being nsnull due to the ReadString() call?
> Actually it looks like nsFrameUtil is dead:

It's not.  It has a CID that's used to create it.  See http://lxr.mozilla.org/seamonkey/source/layout/build/nsLayoutModule.cpp#839

I have no idea what invariants this code can assume, frankly.
Attached patch patch for leak (deleted) — Splinter Review
Ah, I see. Well, we should at least prevent the leak.
Attachment #218182 - Flags: superreview?(dbaron)
Attachment #218182 - Flags: review?(dbaron)
Comment on attachment 218182 [details] [diff] [review]
patch for leak

Please use delete[] instead of delete (and about 30 other places in this file should too).
Attachment #218182 - Flags: superreview?(dbaron)
Attachment #218182 - Flags: superreview+
Attachment #218182 - Flags: review?(dbaron)
Attachment #218182 - Flags: review+
Checked in.

Filed bug 334759 for the (non-leaking) abuses of delete.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: