Bug 1007136 - Ensure malloc/free always match when using JSAutoByteString; r=bz

--HG--
extra : rebase_source : 49b80eda60f767ce03ae315938f86f852c70a5f6
This commit is contained in:
Terrence Cole 2016-01-26 14:53:38 -08:00
parent 52e9feb9d3
commit a664fabb00

View File

@ -4562,7 +4562,7 @@ class MOZ_RAII JSAutoByteString
}
~JSAutoByteString() {
js_free(mBytes);
JS_free(nullptr, mBytes);
}
/* Take ownership of the given byte array. */
@ -4607,7 +4607,7 @@ class MOZ_RAII JSAutoByteString
}
private:
char* mBytes;
char* mBytes;
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
/* Copy and assignment are not supported. */