[Skiboot] [PATCH 1/4] Fix harmless free() after realloc() in test-malloc.c
Stewart Smith
stewart at linux.vnet.ibm.com
Wed Sep 9 15:54:10 AEST 2015
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
core/test/run-malloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/test/run-malloc.c b/core/test/run-malloc.c
index 6e1679c..d79e6f9 100644
--- a/core/test/run-malloc.c
+++ b/core/test/run-malloc.c
@@ -122,7 +122,7 @@ int main(void)
p2 = realloc(p, 200);
assert(p2 == p);
assert(!skiboot_heap.free_list_lock.lock_val);
- free(p);
+ free(p2);
assert(!skiboot_heap.free_list_lock.lock_val);
assert(heap_empty());
@@ -178,7 +178,7 @@ int main(void)
pr = realloc(p,216);
assert(pr);
free(p3);
- free(p);
+ free(pr);
free(p4);
assert(heap_empty());
assert(!skiboot_heap.free_list_lock.lock_val);
--
2.1.4
More information about the Skiboot
mailing list