Closed Bug 1071996 Opened 10 years ago Closed 10 years ago

Use js_free to free memory allocated with JS_malloc in testXDR.cpp

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: ggp, Assigned: ggp)

Details

Attachments

(1 file, 2 obsolete files)

      No description provided.
Comment on attachment 8494106 [details] [diff] [review]
Use js_free to free memory allocated by JS_malloc in testXDR.cpp

Review of attachment 8494106 [details] [diff] [review]:
-----------------------------------------------------------------

I'll batch this up for my next mass-push.  Thanks!

::: js/src/jsapi-tests/testXDR.cpp
@@ +31,5 @@
>             .setFileAndLine(filename, lineno)
>             .setVersion(version);
>      JS::RootedScript script(cx);
>      JS::Compile(cx, obj, options, chars, nchars, &script);
> +    js_free(chars);

JS_free, please, for consistency with JS_malloc.
Attachment #8494106 - Flags: review?(jwalden+bmo) → review+
> I'll batch this up for my next mass-push.  Thanks!

Or Guilherme could upload the final patch, do a try push (assuming he has access; if not, he should probably request it at this point) and then set the "checkin-needed" flag, and then someone like RyanVM will do it.
I'll do it. I'm just waiting for reviews on two other similar patches (bug 1071993 and bug 1071998, in case anyone wants to steal them), then I'll do a try run with all of them applied.
Using JS_free, carrying over :Waldo's r+.
Attachment #8494106 - Attachment is obsolete: true
Attachment #8494623 - Flags: review+
...and updating the commit message so it refers to JS_free as well. Apologies for the spam.
Attachment #8494623 - Attachment is obsolete: true
Attachment #8494632 - Flags: review+
Assignee: nobody → ggoncalves
https://hg.mozilla.org/mozilla-central/rev/07e5a8d5b119
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: