Try to prevent static code analyzer warning about potential leak

This commit is contained in:
twinaphex 2020-06-29 20:02:28 +02:00
parent 28399641da
commit 6318e11027

View File

@ -111,7 +111,11 @@ bool filestream_exists(const char *path)
if (!dummy)
return false;
filestream_close(dummy);
if (filestream_close(dummy) != 0)
if (dummy)
free(dummy);
dummy = NULL;
return true;
}