1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:58:11 +00:00

UserspaceEmulator: Don't complain about free(nullptr)

This commit is contained in:
Andreas Kling 2020-07-15 23:53:58 +02:00
parent 33e3e8d63d
commit c7cf87c9f8

View file

@ -49,6 +49,9 @@ void MallocTracer::target_did_malloc(Badge<SoftCPU>, FlatPtr address, size_t siz
void MallocTracer::target_did_free(Badge<SoftCPU>, FlatPtr address)
{
if (!address)
return;
for (auto& mallocation : m_mallocations) {
if (mallocation.address == address) {
if (mallocation.freed) {