acpi_drv: count only memory allocated by new()

Fixes #4844
This commit is contained in:
Christian Helmuth 2023-05-03 14:05:40 +02:00
parent 2a49eee50f
commit d9643b61af

View File

@ -1238,7 +1238,7 @@ class Element : private List<Element>::Element
continue;
}
freed_up += sizeof(*element) + element->_name ? element->_name_len : 0;
freed_up += sizeof(*element);
Element * next = element->next();
Element::list()->remove(element);