summaryrefslogtreecommitdiffstats
path: root/lib/northbound_sysrepo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/northbound_sysrepo.c')
-rw-r--r--lib/northbound_sysrepo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/northbound_sysrepo.c b/lib/northbound_sysrepo.c
index 3cd310c5a..e9aac3ef1 100644
--- a/lib/northbound_sysrepo.c
+++ b/lib/northbound_sysrepo.c
@@ -575,6 +575,8 @@ static int frr_sr_subscribe_state(const struct lys_node *snode, void *arg)
return YANG_ITER_CONTINUE;
nb_node = snode->priv;
+ if (!nb_node)
+ return YANG_ITER_CONTINUE;
DEBUGD(&nb_dbg_client_sysrepo, "sysrepo: providing data to '%s'",
nb_node->xpath);
@@ -599,6 +601,8 @@ static int frr_sr_subscribe_rpc(const struct lys_node *snode, void *arg)
return YANG_ITER_CONTINUE;
nb_node = snode->priv;
+ if (!nb_node)
+ return YANG_ITER_CONTINUE;
DEBUGD(&nb_dbg_client_sysrepo, "sysrepo: providing RPC to '%s'",
nb_node->xpath);