diff --git a/repos/os/src/drivers/ahci/main.cc b/repos/os/src/drivers/ahci/main.cc index 3026b0538..05e43c7ec 100644 --- a/repos/os/src/drivers/ahci/main.cc +++ b/repos/os/src/drivers/ahci/main.cc @@ -33,10 +33,10 @@ struct Main struct Factory : Block::Driver_factory { Block::Driver *create() { - return new(env()->heap()) Ahci_driver(); } + static Ahci_driver driver; + return &driver; } - void destroy(Block::Driver *driver) { - Genode::destroy(env()->heap(), static_cast(driver)); } + void destroy(Block::Driver *driver) { } } factory; Block::Root root;