diff options
| author | Christian Hopps <chopps@labn.net> | 2023-04-17 01:33:46 -0400 | 
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-04-17 02:15:32 -0400 | 
| commit | e01ecbe194766ceb7d11cd993a02d629fbbf11fa (patch) | |
| tree | b625dca429d6f8f4e953c87dee7ba701c041903e /lib/northbound_sysrepo.c | |
| parent | d249d7e0aba5bc58af2526f846d7ebcf1e817ab8 (diff) | |
lib: always check for error, don't count on dnode being NULL
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound_sysrepo.c')
| -rw-r--r-- | lib/northbound_sysrepo.c | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/northbound_sysrepo.c b/lib/northbound_sysrepo.c index 86105d2e77..7fd4af8356 100644 --- a/lib/northbound_sysrepo.c +++ b/lib/northbound_sysrepo.c @@ -357,7 +357,7 @@ static int frr_sr_state_data_iter_cb(const struct lysc_node *snode,  	ly_errno = 0;  	ly_errno = lyd_new_path(NULL, ly_native_ctx, data->xpath, data->value,  				0, &dnode); -	if (!dnode && ly_errno) { +	if (ly_errno) {  		flog_warn(EC_LIB_LIBYANG, "%s: lyd_new_path() failed",  			  __func__);  		yang_data_free(data);  | 
