Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete clearCapTable() #309

Merged
merged 1 commit into from
Sep 30, 2022
Merged

Conversation

zenhack
Copy link
Contributor

@zenhack zenhack commented Sep 26, 2022

Documentation added in #308 makes this redundant; the ReleaseFuncs returned by the transport already releases any caps in the message, and in all cases this was called immediately before releasing the message as a whole. Not doing this at every call site will make things less brittle.

Note that there is no functional change here, in particular this is not fixing a double free bug: since clearCapTable sets CapTable to nil, it doesn't clash with the call to msg.Reset in the ReleaseFunc.

Documentation added in capnproto#308 makes this redundant; the ReleaseFuncs
returned by the transport already releases any caps in the message,
and in all cases this was called immediately before releasing the
message as a whole. Not doing this at every call site will make things
less brittle.

Note that there is no functional change here, in particular this is not
fixing a double free bug: since clearCapTable sets CapTable to nil, it
doesn't clash with the call to msg.Reset in the ReleaseFunc.
@zenhack zenhack merged commit 502336b into capnproto:main Sep 30, 2022
@zenhack zenhack deleted the kill-clearCapTable branch September 30, 2022 19:01
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