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

IPC Message::push_move_handle might cause handle leak #110

Open
todo bot opened this issue Dec 22, 2018 · 0 comments
Open

IPC Message::push_move_handle might cause handle leak #110

todo bot opened this issue Dec 22, 2018 · 0 comments
Assignees
Labels
project-libuser Related to the libuser todo 🗒️ Created by the todo bot type-bug Something isn't working

Comments

@todo
Copy link

todo bot commented Dec 22, 2018

The push_move_handle function immediately downcasts the handle to a mere int, and forgets the (droppable) handle. This might cause a leak if the underlying IPC message is not sent. It'd be better to keep the handle around as long as possible. In fact, closing the handle after it's been moved might not be such a bad idea. After all, handles are guaranteed not to get reused.


https://github.com/roblabla42/KFS/blob/adee47274ba5c0dc0ef112ce8933becd63d3da77/libuser/src/ipc/mod.rs#L362-L372


This issue was generated by todo based on a TODO comment in adee472 when #90 was merged. cc @roblabla.
@todo todo bot assigned roblabla Dec 22, 2018
@todo todo bot added the todo 🗒️ Created by the todo bot label Dec 22, 2018
@roblabla roblabla added type-bug Something isn't working project-libuser Related to the libuser labels Dec 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project-libuser Related to the libuser todo 🗒️ Created by the todo bot type-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant