mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 656991 - Followup. Use JS_free instead of free. r=bz
--HG-- extra : rebase_source : 00e5cc27f067a191e7a834852faee8c788feb061
This commit is contained in:
parent
78edb678a3
commit
fc4cd2c7f1
@ -97,7 +97,10 @@ nsStructuredCloneContainer::InitFromVariant(nsIVariant *aData, JSContext *aCx)
|
||||
if (!mData) {
|
||||
mSize = 0;
|
||||
mVersion = 0;
|
||||
free(jsBytes);
|
||||
|
||||
// FIXME This should really be js::Foreground::Free, but that's not public.
|
||||
JS_free(aCx, jsBytes);
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
else {
|
||||
@ -105,7 +108,9 @@ nsStructuredCloneContainer::InitFromVariant(nsIVariant *aData, JSContext *aCx)
|
||||
}
|
||||
|
||||
memcpy(mData, jsBytes, mSize);
|
||||
free(jsBytes);
|
||||
|
||||
// FIXME Similarly, this should be js::Foreground::free.
|
||||
JS_free(aCx, jsBytes);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user