From 2ffd310fa0a98725f90852e6d058f3c7cf01e1d1 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 0a7e08744c4..4ff44c1db70 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); }