diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index ec5874793f7..0d381c614d8 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -4065,12 +4065,11 @@ ArrayBufferBuilder::getArrayBuffer(JSContext* aCx) } JSObject* obj = JS_NewArrayBufferWithContents(aCx, mLength, mDataPtr); - mDataPtr = nullptr; mLength = mCapacity = 0; if (!obj) { js_free(mDataPtr); - return nullptr; } + mDataPtr = nullptr; return obj; }