Skip to content

Fix memory leak in decompression errors and remove redundant NULL assignment#490

Merged
mtrojnar merged 2 commits intomtrojnar:masterfrom
olszomal:coverity
Feb 25, 2026
Merged

Fix memory leak in decompression errors and remove redundant NULL assignment#490
mtrojnar merged 2 commits intomtrojnar:masterfrom
olszomal:coverity

Conversation

@olszomal
Copy link
Collaborator

Pull Request Type

  • Bug fix
  • New feature
  • Code style / formatting / renaming
  • Refactoring (no functional or API changes)
  • Build / CI related changes
  • Documentation
  • Other (please describe):

Related Issue

Issue number: N/A

CID 1669014
CID 1669015

Scope of Changes

This PR fixes a potential memory leak in the DEFLATE error paths by ensuring compressedData is freed before early returns.
It also removes redundant bhash = NULL assignments after BIO_free_all() in pe_page_hash_calc(), resolving Coverity warning.

No functional changes.

Testing

  • Existing tests
  • New tests added
  • Manual testing

Additional Notes

License Declaration

  • I hereby agree to license my contribution under the project's license.

@mtrojnar mtrojnar merged commit d0ef178 into mtrojnar:master Feb 25, 2026
10 checks passed
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