diff --git a/src/filesystem.c b/src/filesystem.c index d07902f..2b5599e 100644 --- a/src/filesystem.c +++ b/src/filesystem.c @@ -391,6 +391,7 @@ bool File_Load(const char *path, char **output_data, size_t *output_size) if (File_Pos(fp) != data_size) { LOG_ERROR("Can't read file %s", path); Memory_FreePointer(&data); + File_Close(fp); return false; } File_Close(fp);