mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1007136 - Ensure malloc/free always match when using JSAutoByteString; r=bz
--HG-- extra : rebase_source : 49b80eda60f767ce03ae315938f86f852c70a5f6
This commit is contained in:
parent
52e9feb9d3
commit
a664fabb00
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user