Skip to content

fix: Resolve memory leak in file content hashing buffer#43

Merged
patricioxavier8 merged 1 commit into
mainfrom
fix/encrypt-memory-leak
Jul 16, 2026
Merged

fix: Resolve memory leak in file content hashing buffer#43
patricioxavier8 merged 1 commit into
mainfrom
fix/encrypt-memory-leak

Conversation

@patricioxavier8

Copy link
Copy Markdown
Contributor

This PR resolves a persistent memory leak identified in the Encrypt.getFileContentHash(stream:) method within the swift-core package.

Added 'defer { buffer.deallocate() }' immediately after allocating the UnsafeMutablePointer . This prevents cumulative memory leaks during file hashing.
@patricioxavier8 patricioxavier8 self-assigned this Jul 15, 2026
@patricioxavier8 patricioxavier8 added the bug Something isn't working label Jul 15, 2026
@patricioxavier8 patricioxavier8 requested a review from sg-gs July 15, 2026 01:15
@patricioxavier8 patricioxavier8 merged commit 08c79ea into main Jul 16, 2026
1 check passed
@patricioxavier8 patricioxavier8 deleted the fix/encrypt-memory-leak branch July 16, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants