From 2778debc29399589bddee9f19f1065e810ec99b6 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 22 Nov 2019 15:18:53 +0100 Subject: [PATCH] ram_fs: close open nodes on session close Fixes #3559 --- repos/os/src/server/ram_fs/main.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/os/src/server/ram_fs/main.cc b/repos/os/src/server/ram_fs/main.cc index f8b5e8b686..a4e479ef87 100644 --- a/repos/os/src/server/ram_fs/main.cc +++ b/repos/os/src/server/ram_fs/main.cc @@ -236,6 +236,9 @@ class Ram_fs::Session_component : public File_system::Session_rpc_object */ ~Session_component() { + while (_open_node_registry.apply_any([&] (Open_node &node) { + destroy(_alloc, &node); })) { } + Dataspace_capability ds = tx_sink()->dataspace(); _ram.free(static_cap_cast(ds)); }