summaryrefslogtreecommitdiffstats
path: root/core/test
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-09-09 14:46:34 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-09 15:51:23 +1000
commit18cc99db5867438b2b9ba8dca4e78455c2a98abf (patch)
tree43e9d9223917180224d63325fb458eceba4105d8 /core/test
parent3904f94643225efff8bbf7fe84532954e88f0142 (diff)
downloadtalos-skiboot-18cc99db5867438b2b9ba8dca4e78455c2a98abf.tar.gz
talos-skiboot-18cc99db5867438b2b9ba8dca4e78455c2a98abf.zip
Fix harmless free() after realloc() in test-malloc.c
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/test')
-rw-r--r--core/test/run-malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/test/run-malloc.c b/core/test/run-malloc.c
index 6e1679c5..d79e6f94 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);
OpenPOWER on IntegriCloud