Closed
Bug 898675
Opened 12 years ago
Closed 12 years ago
[binary data] FieldList is not freed on error in StructType::layout
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: nsm, Assigned: nsm)
References
Details
Attachments
(1 file)
2.79 KB,
patch
|
nmatsakis
:
review+
|
Details | Diff | Splinter Review |
errors in layout (places where layout() returns false) should free the FieldList that is allocated.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #782270 -
Flags: review?(nmatsakis)
Comment 2•12 years ago
|
||
Comment on attachment 782270 [details] [diff] [review]
Binary Data: Free StructType fieldList on error.
Review of attachment 782270 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/builtin/BinaryData.cpp
@@ +1528,4 @@
>
> RootedObject fieldType(cx, fieldTypeVal.toObjectOrNull());
> if (!IsBinaryType(fieldType))
> + goto error;
I think we should report some sort of error here.
Attachment #782270 -
Flags: review?(nmatsakis) → review+
Assignee | ||
Comment 3•12 years ago
|
||
The error is reported by StructType::create(), should it be more specific? Landing for now.
https://hg.mozilla.org/integration/mozilla-inbound/rev/0da6dd571263
Comment 4•12 years ago
|
||
Ah, I see. Usually the convention as I understand it is that if a function takes a JSContext *cx, it will ensure that an error is reported if it returns an error. Maybe just add a comment.
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in
before you can comment on or make changes to this bug.
Description
•