]> asedeno.scripts.mit.edu Git - linux.git/commit
radix tree test suite: Fix leaky tests
authorMatthew Wilcox <mawilcox@microsoft.com>
Sun, 29 Jan 2017 06:48:34 +0000 (01:48 -0500)
committerMatthew Wilcox <mawilcox@microsoft.com>
Tue, 14 Feb 2017 02:44:06 +0000 (21:44 -0500)
commit18d0c57394e42ff536e5fdc776b6b217fdd9889c
tree905864b7e31e039ba324cd3a354f0c1fc9527cf9
parent829f83d3653ef7105187b0110887dbfd46a30ce4
radix tree test suite: Fix leaky tests

If item_insert() or item_insert_order() failed to insert an item, they
would leak the item they had just created.  This was causing runaway
memory consumption while running the iteration_check testcase, which
proves that Ross has too much memory in his workstation ;-)

Make sure to free the item on error.  Found with -fsanitize=address.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Reviewed-by: Rehas Sachdeva <aquannie@gmail.com>
tools/testing/radix-tree/test.c