diff options
| author | Russ White <russ@riw.us> | 2021-10-05 19:24:34 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-05 19:24:34 -0400 | 
| commit | a3232e63e642742cef4f2c3cb6fd15f6500004bb (patch) | |
| tree | c2ea9d1a2be4dcac988ff4f0d2e03d2330e9b8c6 | |
| parent | f72b987de1d4897919902b96559c8fd4da58b366 (diff) | |
| parent | 0f538858c2bd22072539c8dbd4ad87601b0fc8ac (diff) | |
Merge pull request #9733 from opensourcerouting/grpc-fix-missingfrr-8.2-dev
lib: fix gRPC crash on missing YANG node
| -rw-r--r-- | lib/northbound_grpc.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp index 71f07dfe86..e227d0385c 100644 --- a/lib/northbound_grpc.cpp +++ b/lib/northbound_grpc.cpp @@ -344,6 +344,10 @@ static struct lyd_node *get_dnode_config(const std::string &path)  {  	struct lyd_node *dnode; +	if (!yang_dnode_exists(running_config->dnode, +			       path.empty() ? NULL : path.c_str())) +		return NULL; +  	dnode = yang_dnode_get(running_config->dnode,  			       path.empty() ? NULL : path.c_str());  	if (dnode)  | 
