Fix memory leak in a jsapi-test. No bug, r=Waldo.

--HG--
extra : rebase_source : c9cdf4fc2391f812a3decb645900ac1ec4ffa118
This commit is contained in:
Jason Orendorff 2009-12-17 11:30:14 -06:00
parent 3b6b91df1d
commit 51bdff8212

View File

@ -119,6 +119,7 @@ BEGIN_TEST(testXDR_bug525481)
JSXDRState *r = JS_XDRNewMem(cx, JSXDR_DECODE); JSXDRState *r = JS_XDRNewMem(cx, JSXDR_DECODE);
JS_XDRMemSetData(r, frozen, nbytes); JS_XDRMemSetData(r, frozen, nbytes);
CHECK(JS_XDRScript(r, &script)); CHECK(JS_XDRScript(r, &script));
JS_DestroyScript(cx, script);
JS_XDRDestroy(r); // this frees `frozen` JS_XDRDestroy(r); // this frees `frozen`
return true; return true;
} }