Skip to content

Prevent double-free when closing an interface event listener#276

Merged
jthomas43 merged 2 commits intoholepunchto:mainfrom
jthomas43:fix-double-free-on-teardown
Mar 4, 2026
Merged

Prevent double-free when closing an interface event listener#276
jthomas43 merged 2 commits intoholepunchto:mainfrom
jthomas43:fix-double-free-on-teardown

Conversation

@jthomas43
Copy link
Copy Markdown
Contributor

Prevent double-free when closing interface listeners. This can happen inadvertently when a user calls udx_interface_close() and then udx_teardown() before the interface->on_close() callback removes the interface from udx->interfaces.

@jthomas43 jthomas43 requested a review from kasperisager March 4, 2026 03:08
@kasperisager
Copy link
Copy Markdown
Contributor

We may want to return an EINVAL instead of success to clearly signal double close.

@jthomas43 jthomas43 merged commit 6f762f8 into holepunchto:main Mar 4, 2026
3 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