Skip to content

Commit

Permalink
fix memory leak in libsmw
Browse files Browse the repository at this point in the history
  • Loading branch information
randomdude999 committed Jan 19, 2024
1 parent c4ee46b commit 4cd0091
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/asar/libsmw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ uint32_t closerom(bool save)
}
if (thisfile != InvalidFileHandle) close_file(thisfile);
if (romdata) free(const_cast<unsigned char*>(romdata));
if (romdata_r) free(const_cast<unsigned char*>(romdata_r));
thisfile= InvalidFileHandle;
romdata= nullptr;
romdata_r = nullptr;
Expand Down

0 comments on commit 4cd0091

Please sign in to comment.