Closed Bug 603366 Opened 9 years ago Closed 9 years ago

NewCompartment leaks compartment when compartment->init() fails

Categories

(Core :: JavaScript Engine, defect, minor)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, memory-leak, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

2761 NewCompartment(JSContext *cx, JSPrincipals *principals)
2762 {
2763     JSRuntime *rt = cx->runtime;
2764     JSCompartment *compartment = new JSCompartment(rt);
2765     if (!compartment || !compartment->init()) {
2766         JS_ReportOutOfMemory(cx);
2767         return NULL;
Attached patch patchSplinter Review
Assignee: general → timeless
Status: NEW → ASSIGNED
Attachment #482496 - Flags: review?(gal)
Attachment #482496 - Flags: review?(gal) → review+
http://hg.mozilla.org/mozilla-central/rev/db22166063a0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.