Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
memory: fix memory leak in File_Open
Browse files Browse the repository at this point in the history
  • Loading branch information
walkawayy authored and rr- committed Jun 24, 2024
1 parent 8fb88ab commit 638af1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/filesystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ MYFILE *File_Open(const char *path, FILE_OPEN_MODE mode)
}
Memory_FreePointer(&full_path);
if (!file->fp) {
Memory_FreePointer(&file->path);
Memory_FreePointer(&file);
}
return file;
Expand Down

0 comments on commit 638af1a

Please sign in to comment.