mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Fix potential leak with file handle
This commit is contained in:
parent
148b11bd33
commit
cc106b4d1c
@ -4319,6 +4319,7 @@ bool CEvent::DemoPlayStart()
|
|||||||
nb = fread (&header, sizeof (DemoHeader), 1, file);
|
nb = fread (&header, sizeof (DemoHeader), 1, file);
|
||||||
if (nb < 1)
|
if (nb < 1)
|
||||||
{
|
{
|
||||||
|
fclose (file);
|
||||||
DemoPlayStop();
|
DemoPlayStop();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user