mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: zone: free poolchain on every iteration of Memory_Init
free poolchain when calling Memory_Init multiple times. Fixes: memory leak when running run-fuzzer-Image_LoadBMP Signed-off-by: veygax <veyga@veygax.dev>
This commit is contained in:
@@ -517,6 +517,10 @@ Memory_Init
|
||||
*/
|
||||
void Memory_Init( void )
|
||||
{
|
||||
if( poolchain )
|
||||
{
|
||||
Q_free( poolchain );
|
||||
}
|
||||
poolchain = NULL; // init mem chain
|
||||
poolcount = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user