mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Fixed use after free in ram_file_system.
This commit is contained in:
@@ -778,13 +778,14 @@ class Vfs::Ram_file_system : public Vfs::File_system
|
|||||||
bool node_modified = ram_handle->modifying;
|
bool node_modified = ram_handle->modifying;
|
||||||
|
|
||||||
ram_handle->node.close(*ram_handle);
|
ram_handle->node.close(*ram_handle);
|
||||||
destroy(vfs_handle->alloc(), ram_handle);
|
|
||||||
|
|
||||||
if (ram_handle->node.unlinked() && !ram_handle->node.opened()) {
|
if (ram_handle->node.unlinked() && !ram_handle->node.opened()) {
|
||||||
destroy(_env.alloc(), &ram_handle->node);
|
destroy(_env.alloc(), &ram_handle->node);
|
||||||
} else if (node_modified) {
|
} else if (node_modified) {
|
||||||
node.notify();
|
node.notify();
|
||||||
}
|
}
|
||||||
|
destroy(vfs_handle->alloc(), ram_handle);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Stat_result stat(char const *path, Stat &stat) override
|
Stat_result stat(char const *path, Stat &stat) override
|
||||||
|
|||||||
Reference in New Issue
Block a user