Skip to content

Commit 0da9655

Browse files
jsc-semichalvasko
authored andcommitted
src/parser_lyb.c: coverity fix - dereference after null check
1 parent 1e64126 commit 0da9655

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/parser_lyb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ lyb_parse_schema_hash(struct lyd_lyb_ctx *lybctx, const struct lysc_node *sparen
773773
LOGERR(lybctx->lybctx->ctx, LY_EINT, "Failed to find matching hash for a top-level node from \"%s\".",
774774
mod->name);
775775
} else {
776+
assert(sparent);
776777
LOGERR(lybctx->lybctx->ctx, LY_EINT, "Failed to find matching hash for a child node of \"%s\".",
777778
sparent->name);
778779
}

0 commit comments

Comments
 (0)