diff options
Diffstat (limited to 'tests/libqos/malloc.c')
-rw-r--r-- | tests/libqos/malloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/libqos/malloc.c b/tests/libqos/malloc.c index 827613005a..82b9df537a 100644 --- a/tests/libqos/malloc.c +++ b/tests/libqos/malloc.c @@ -285,6 +285,9 @@ uint64_t guest_alloc(QGuestAllocator *allocator, size_t size) void guest_free(QGuestAllocator *allocator, uint64_t addr) { + if (!addr) { + return; + } mlist_free(allocator, addr); if (allocator->opts & ALLOC_PARANOID) { mlist_check(allocator); |