Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Match deallocation for allocators #1205

Merged
merged 1 commit into from
Sep 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
AssetManager: Match allocators
Currently on line 116 of AssetManager.cpp, we have the following
`*data = (char*)malloc(*len);`
however on line 45 of AssetManager.h we have `delete m_Base;` which is not the same allocator as we used to allocate the memory.
This PR matches the malloc and free to be the correct calls.
  • Loading branch information
EmosewaMC committed Sep 30, 2023
commit 5d3fcc765616bba7108731c131f690f7c46645f4
2 changes: 1 addition & 1 deletion dCommon/dClient/AssetManager.h
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ struct AssetMemoryBuffer : std::streambuf {
}

void close() {
delete m_Base;
free(m_Base);
}
};

Loading