]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
asserts to keep clang scan happy
authorAlan T. DeKok <aland@freeradius.org>
Wed, 20 May 2020 17:04:10 +0000 (13:04 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 20 May 2020 17:06:06 +0000 (13:06 -0400)
src/lib/util/heap.c

index a93ecb2ff57fdf24522522d61cac610f68648bc4..cf5d96e5a1299870adb3c13fe04d24c914f833c2 100644 (file)
@@ -236,6 +236,10 @@ int fr_heap_extract(fr_heap_t *hp, void *data)
                }
        }
 
+       fr_assert(parent <= hp->num_elements);
+       fr_assert(hp->p != NULL);
+       fr_assert(hp->p[parent] != NULL);
+
        RESET_OFFSET(hp, parent);
        child = HEAP_LEFT(parent);
        while (child <= max) {