lib: fix coverity issue

** CID 1575595:  Null pointer dereferences  (REVERSE_INULL)

Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
Christian Hopps 2024-01-12 16:37:30 +00:00
parent d2c275a793
commit 008ba3e3fb
No known key found for this signature in database
GPG key ID: 2E1D830ED7B83025

View file

@ -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;