Skip to content

Set keyAllocated=1 when initializing any key#1038

Open
padelsbach wants to merge 2 commits into
wolfSSL:masterfrom
padelsbach:keyallocated-flag
Open

Set keyAllocated=1 when initializing any key#1038
padelsbach wants to merge 2 commits into
wolfSSL:masterfrom
padelsbach:keyallocated-flag

Conversation

@padelsbach

@padelsbach padelsbach commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Fixes a possible memory leak if parsing fails. Only a problem with --enable-heapmath since normal spmath does not allocate buffers for the key.

Added unit tests and heapmath variant to CI.

Also, adding heapmath+asan uncovered a second unrelated leak when freeing the KEX key. Fix included as a second commit.

@padelsbach padelsbach marked this pull request as ready for review June 16, 2026 06:22
@padelsbach padelsbach requested a review from ejohnstown June 16, 2026 06:22
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.

1 participant