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

encoder_kvazaar.cc: Fix some memory leaks #1141

Merged
merged 1 commit into from
Mar 30, 2024

Conversation

hlewin
Copy link
Contributor

@hlewin hlewin commented Mar 10, 2024

This fixes the following memory leaks:

  • the data chunks are not freed in all cases after being appended to the encoder output
  • append_chunk_data throwing an exception (std::bad_alloc) would not free any of the kvazaar-structures

At least the successful encoding case should be leak-free now: The address sanitizer does not report any leaks.
I did not test the exceptional cases - using unique_ptr this should be no different than the successful case.

@farindk farindk merged commit a1eb8a7 into strukturag:master Mar 30, 2024
35 checks passed
@farindk
Copy link
Contributor

farindk commented Mar 30, 2024

Thank you

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

Successfully merging this pull request may close these issues.

2 participants