platform_drv: reset pointer when releasing device

Ref #3956
This commit is contained in:
Stefan Kalkowski 2020-11-23 17:14:53 +01:00 committed by Christian Helmuth
parent 955afd8837
commit f4ac642f64

View File

@ -54,12 +54,14 @@ void Driver::Device::release(Session_component & sc)
_io_mem_list.for_each([&] (Io_mem & io_mem) {
if (io_mem.io_mem) {
destroy(sc.heap(), io_mem.io_mem);
io_mem.io_mem = nullptr;
}
});
_irq_list.for_each([&] (Irq & irq) {
if (irq.irq) {
destroy(sc.heap(), irq.irq);
irq.irq = nullptr;
}
});