From d7f08c5b753b3b4f7b63f5d3187024a20e3e7137 Mon Sep 17 00:00:00 2001 From: Michal Vasko Date: Mon, 4 Nov 2024 11:53:59 +0100 Subject: [PATCH] netconf BUGFIX properly handle no returned data Refs #1661 --- src/netconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netconf.c b/src/netconf.c index e0b790fb..5fc07132 100644 --- a/src/netconf.c +++ b/src/netconf.c @@ -73,8 +73,8 @@ np2srv_get_rpc_data(sr_session_ctx_t *session, const char *xp_filter, sr_session goto cleanup; } - if (!strcmp(xp_filter, "/*")) { - /* no filter, use all the data */ + if (!strcmp(xp_filter, "/*") || !base_data) { + /* no filter, use all the data, or no data at all */ *data = base_data; base_data = NULL; goto cleanup;