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

This commit is contained in:
Terrence Cole 2016-01-26 14:53:38 -08:00
parent 9964bfe4ca
commit 14a4339577

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. */