]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove remaining from heap_cycle() (#4149)
authorJames Jones <jejones3141@gmail.com>
Wed, 21 Jul 2021 20:45:08 +0000 (15:45 -0500)
committerGitHub <noreply@github.com>
Wed, 21 Jul 2021 20:45:08 +0000 (15:45 -0500)
heap_cycle() calloc()s an array and frees it, but never uses it.

src/lib/util/heap_tests.c

index 1ca616cb03b5d480955148d5c92c498d9f326c8d..f6d84704a20da2ca1d3d5d2fa0f141200a0b730e 100644 (file)
@@ -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 = {