diff --git a/js/src/jsapi-tests/testXDR.cpp b/js/src/jsapi-tests/testXDR.cpp index bd0dc840793..4989ee30217 100644 --- a/js/src/jsapi-tests/testXDR.cpp +++ b/js/src/jsapi-tests/testXDR.cpp @@ -119,6 +119,7 @@ BEGIN_TEST(testXDR_bug525481) JSXDRState *r = JS_XDRNewMem(cx, JSXDR_DECODE); JS_XDRMemSetData(r, frozen, nbytes); CHECK(JS_XDRScript(r, &script)); + JS_DestroyScript(cx, script); JS_XDRDestroy(r); // this frees `frozen` return true; }