From: James Jones Date: Wed, 21 Jul 2021 20:45:08 +0000 (-0500) Subject: Remove remaining from heap_cycle() (#4149) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74eee7f398cbcd00cb71b4349f16ae7575c68acb;p=thirdparty%2Ffreeradius-server.git Remove remaining from heap_cycle() (#4149) heap_cycle() calloc()s an array and frees it, but never uses it. --- diff --git a/src/lib/util/heap_tests.c b/src/lib/util/heap_tests.c index 1ca616cb03b..f6d84704a20 100644 --- a/src/lib/util/heap_tests.c +++ b/src/lib/util/heap_tests.c @@ -139,7 +139,6 @@ static void heap_cycle(void) fr_heap_t *hp; int i; heap_thing *array; - heap_thing *remaining; int to_remove; int ret; @@ -154,7 +153,6 @@ static void heap_cycle(void) TEST_CHECK(hp != NULL); array = malloc(sizeof(heap_thing) * HEAP_CYCLE_SIZE); - remaining = calloc(sizeof(heap_thing) * HEAP_CYCLE_SIZE, 1); /* * Initialise random values @@ -213,7 +211,6 @@ static void heap_cycle(void) talloc_free(hp); free(array); - free(remaining); } TEST_LIST = {