mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Fix double-free when handle is shrunk to zero size
This commit is contained in:
@@ -81,7 +81,7 @@ namespace PortabilityLayer
|
||||
if (newSize != hdl->m_size)
|
||||
{
|
||||
void *newBuf = Realloc(hdl->m_contents, newSize);
|
||||
if (!newBuf)
|
||||
if (!newBuf && newSize != 0)
|
||||
return false;
|
||||
|
||||
hdl->m_contents = newBuf;
|
||||
|
Reference in New Issue
Block a user