From b83de1e7061f39d17b67f75d43fabbfbfaf79856 Mon Sep 17 00:00:00 2001 From: "timeless@mozdev.org" Date: Wed, 12 Aug 2009 11:49:53 +0200 Subject: [PATCH] Bug 505771 double free [@ JS_free - snarf] in jsshell r=gal --- js/src/shell/js.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index fafc5c71b52..b9b943d7584 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -3558,7 +3558,6 @@ Snarf(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) if (buf) { cc = fread(buf, 1, len, file); if (cc != len) { - JS_free(cx, buf); JS_ReportError(cx, "can't read %s: %s", pathname, (ptrdiff_t(cc) < 0) ? strerror(errno) : "short read"); } else {