summaryrefslogtreecommitdiffstats
path: root/core/test
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-09-08 13:53:15 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-08 13:53:24 +1000
commit849419dfc658bf98aa24b4b7310100f9eda99ae1 (patch)
tree854bb875dd1257704d40b6036dd6ef3de6494f52 /core/test
parent4a92d92231e64bbbca19e07518a564e6ae2034bc (diff)
downloadblackbird-skiboot-849419dfc658bf98aa24b4b7310100f9eda99ae1.tar.gz
blackbird-skiboot-849419dfc658bf98aa24b4b7310100f9eda99ae1.zip
trivial run-malloc test fixup that was fooling coverity
although we assert that p2==p, coverity doesn't pick this up, so we get a false positive of a double free. This is trivial to fix just by modifying our test case. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/test')
-rw-r--r--core/test/run-malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/test/run-malloc.c b/core/test/run-malloc.c
index 46231088..6e1679c5 100644
--- a/core/test/run-malloc.c
+++ b/core/test/run-malloc.c
@@ -134,7 +134,7 @@ int main(void)
p2 = realloc(p, 1);
assert(!skiboot_heap.free_list_lock.lock_val);
assert(p2 == p);
- free(p);
+ free(p2);
assert(!skiboot_heap.free_list_lock.lock_val);
assert(heap_empty());
OpenPOWER on IntegriCloud