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

Memory leak at Create function. #22

Open
Trico-Everfire opened this issue Apr 11, 2023 · 0 comments
Open

Memory leak at Create function. #22

Trico-Everfire opened this issue Apr 11, 2023 · 0 comments

Comments

@Trico-Everfire
Copy link

https://github.com/NeilJed/VTFLib/blob/main/VTFLib/VTFFile.cpp#L661-L677

The memory leak in question is the generation of new data for the resizing of the image data, but instead of getting rid of the old data, it sets a new memory address without clearing the old one first. This is also UB as the image data is not VTFLib's to mutate, it should be copied and disposed of at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant