mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1044193 - Always cleanup on heap allocation path, r=glandium
This commit is contained in:
parent
f7a4a85952
commit
597e1d3236
@ -52,8 +52,6 @@ VolatileBuffer::Init(size_t aSize, size_t aAlignment)
|
||||
}
|
||||
|
||||
if (ioctl(mFd, ASHMEM_SET_SIZE, mSize) < 0) {
|
||||
close(mFd);
|
||||
mFd = -1;
|
||||
goto heap_alloc;
|
||||
}
|
||||
|
||||
@ -63,6 +61,12 @@ VolatileBuffer::Init(size_t aSize, size_t aAlignment)
|
||||
}
|
||||
|
||||
heap_alloc:
|
||||
mBuf = nullptr;
|
||||
if (mFd >= 0) {
|
||||
close(mFd);
|
||||
mFd = -1;
|
||||
}
|
||||
|
||||
#ifdef MOZ_MEMORY
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
__wrap_posix_memalign(&mBuf, aAlignment, aSize);
|
||||
|
Loading…
Reference in New Issue
Block a user