Skip to content

Commit eec410f

Browse files
committed
client session BUGFIX check for parsing errors
1 parent 262067e commit eec410f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/session_client.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,6 +1841,9 @@ nc_send_rpc(struct nc_session *session, struct nc_rpc *rpc, int timeout, uint64_
18411841
} else {
18421842
data = lyd_parse_mem(session->ctx, rpc_gen->content.xml_str, LYD_XML, LYD_OPT_RPC | LYD_OPT_NOEXTDEPS
18431843
| (session->flags & NC_SESSION_CLIENT_NOT_STRICT ? 0 : LYD_OPT_STRICT), NULL);
1844+
if (!data) {
1845+
return NC_MSG_ERROR;
1846+
}
18441847
}
18451848
break;
18461849

0 commit comments

Comments
 (0)