From 008ba3e3fb955c3c78cebcbbb20ece8a8c26e6c7 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Fri, 12 Jan 2024 16:37:30 +0000 Subject: [PATCH] lib: fix coverity issue ** CID 1575595: Null pointer dereferences (REVERSE_INULL) Signed-off-by: Christian Hopps --- lib/northbound_oper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/northbound_oper.c b/lib/northbound_oper.c index d382bdcfa6..afce773181 100644 --- a/lib/northbound_oper.c +++ b/lib/northbound_oper.c @@ -517,7 +517,8 @@ static enum nb_error nb_op_ys_init_node_infos(struct nb_op_yield_state *ys) if (node && !CHECK_FLAG(node->schema->nodetype, LYS_CONTAINER | LYS_LIST)) node = &node->parent->node; - assert(CHECK_FLAG(node->schema->nodetype, LYS_CONTAINER | LYS_LIST)); + assert(!node || + CHECK_FLAG(node->schema->nodetype, LYS_CONTAINER | LYS_LIST)); if (!node) return NB_ERR_NOT_FOUND; -- 2.39.5