]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Check fr_minmax_heap_alloc() return value (CID #1504069) (#4513)
authorJames Jones <jejones3141@gmail.com>
Fri, 13 May 2022 21:24:40 +0000 (16:24 -0500)
committerGitHub <noreply@github.com>
Fri, 13 May 2022 21:24:40 +0000 (17:24 -0400)
src/lib/util/minmax_heap_tests.c

index aa0aa6659b5787f93507b4592d3c606f6b3892ad..fa9e8295c8f38e017e42df54a96096c26e580d2b 100644 (file)
@@ -232,6 +232,7 @@ static void minmax_heap_burn_in(void)
        for (unsigned int i = 0; i < BURN_IN_OPS; i++) array[i].data = fr_fast_rand(&rand_ctx) % 65537;
 
        hp = fr_minmax_heap_alloc(NULL, minmax_heap_cmp, minmax_heap_thing, idx, 0);
+       TEST_CHECK(hp != NULL);
 
        for (unsigned int i = 0; i < BURN_IN_OPS; i++) {
                minmax_heap_thing       *ret_thing = NULL;