UserspaceEmulator: Don't complain about free(nullptr)

This commit is contained in:
Andreas Kling 2020-07-15 23:53:58 +02:00
commit c7cf87c9f8
Notes: sideshowbarker 2024-07-19 04:47:18 +09:00

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) {