mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[PR #243] fix: free partial junk spec allocations on setup failure #255
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-linux-kernel-module#255
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/243
Author: @HeisLuka
Created: 9/14/2026
Status: 🔄 Open
Base:
master← Head:fix/jp-spec-allocation-cleanup📝 Commits (1)
15fb0b1fix: free partial junk spec allocations on setup failure📊 Changes
1 file changed (+8 additions, -0 deletions)
View changed files
📝
src/junk.c(+8 -0)📄 Description
Summary
Fix a partial allocation leak in
jp_spec_setup().spec->pktandspec->modsare allocated separately. If one allocation succeedsand the other fails, the function returns
-ENOMEMwithout freeing thesuccessful allocation.
This change cleans up both buffers on the error path and resets the associated
pointers and sizes, leaving the
jp_specin a consistent empty state.Scope
This only changes the allocation-failure path. Successful junk spec setup and
packet generation are unchanged.
Fixes #102
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.