From 402eaa8531ffddc39c8f41e8d8fdbd38eeade273 Mon Sep 17 00:00:00 2001 From: Guilherme Goncalves Date: Thu, 25 Sep 2014 04:00:00 -0400 Subject: [PATCH] Bug 1071998 - Use js_free to free JSShellContextData in the JS shell. r=jorendorff --HG-- extra : rebase_source : cee995d8aa10e9e45f23984345f2978b7e8e4798 --- js/src/shell/js.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 0a7e08744c41..4ff44c1db70f 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -5452,7 +5452,7 @@ DestroyContext(JSContext *cx, bool withGC) // data. JSShellContextData *data = (JSShellContextData *) JS_GetContextPrivate(cx); JS_SetContextPrivate(cx, nullptr); - free(data); + js_free(data); withGC ? JS_DestroyContext(cx) : JS_DestroyContextNoGC(cx); }