projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebe7d8b
)
libqos: Allow calling guest_free on NULL pointer
author
Fam Zheng
<famz@redhat.com>
Fri, 24 Apr 2015 11:35:17 +0000
(19:35 +0800)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Wed, 17 Jun 2015 14:03:47 +0000
(16:03 +0200)
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/libqos/malloc.c
patch
|
blob
|
history
diff --git
a/tests/libqos/malloc.c
b/tests/libqos/malloc.c
index 827613005a75970841dbb713759beb3b90b673a5..82b9df537a8293ff9b09b8c31f1d6fd2d4a0b968 100644
(file)
--- 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);