Skip to content

Fix use-after-free in lsof_select_process_regex#351

Merged
jiegec merged 1 commit intolsof-org:masterfrom
cuiweixie:bugfix/use-after-free
Mar 10, 2026
Merged

Fix use-after-free in lsof_select_process_regex#351
jiegec merged 1 commit intolsof-org:masterfrom
cuiweixie:bugfix/use-after-free

Conversation

@cuiweixie
Copy link
Contributor

Set xp to NULL after assigning to CmdRx[i].exp so that CLEAN(xp) in the cleanup path does not free memory that is now owned by CmdRx[i].exp.

Set xp to NULL after assigning to CmdRx[i].exp so that CLEAN(xp) in
the cleanup path does not free memory that is now owned by CmdRx[i].exp.
@jiegec jiegec merged commit 04f3487 into lsof-org:master Mar 10, 2026
15 of 16 checks passed
jiegec added a commit that referenced this pull request Mar 10, 2026
As a follow up for #351, add regression test in LTbasic, and fix memory
leaks in lsof_destroy due to CmdRx.
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