We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 692d67a + 96d2ef3 commit b1fc46aCopy full SHA for b1fc46a
src/critnib/critnib.c
@@ -537,6 +537,11 @@ find_predecessor(struct critnib_node *__restrict n) {
537
}
538
539
utils_atomic_load_acquire_ptr((void **)&n->child[nib], (void **)&n);
540
+
541
+ if (!n) {
542
+ return NULL;
543
+ }
544
545
if (is_leaf(n)) {
546
return to_leaf(n);
547
@@ -650,6 +655,11 @@ static struct critnib_leaf *find_successor(struct critnib_node *__restrict n) {
650
655
651
656
652
657
n = n->child[nib];
658
659
660
661
662
653
663
654
664
665
0 commit comments