Skip to content

Commit

Permalink
Fix use-after-free in FileAccess::exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mihe committed Aug 9, 2024
1 parent 739019e commit 613600f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/io/file_access_pack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ void PackedData::_free_packed_dirs(PackedDir *p_dir) {
}

PackedData::~PackedData() {
if (singleton == this) {
singleton = nullptr;
}

for (int i = 0; i < sources.size(); i++) {
memdelete(sources[i]);
}
Expand Down

0 comments on commit 613600f

Please sign in to comment.