mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
socket_fs: invalidate fd on context destruction
This prevents accesses to `Socket_fs::Context::_fd_ready_ready()` that caused a "__cxa_pure_virtual called" error. Fixes #5265
This commit is contained in:
parent
96ef527436
commit
7b8a2e77e4
@ -236,7 +236,11 @@ struct Libc::Socket_fs::Context : Plugin_context
|
||||
|
||||
~Context()
|
||||
{
|
||||
_fd_apply([] (int fd) { ::close(fd); });
|
||||
for (unsigned i = 0; i < Fd::MAX; ++i) {
|
||||
::close(_fd[i].num);
|
||||
_fd[i].num = -1;
|
||||
_fd[i].file = nullptr;
|
||||
}
|
||||
::close(_handle_fd);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user