aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/client/stat_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/client/stat_client.c')
-rw-r--r--src/vpp-api/client/stat_client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vpp-api/client/stat_client.c b/src/vpp-api/client/stat_client.c
index 01ed7c7e137..1c31ea0cb23 100644
--- a/src/vpp-api/client/stat_client.c
+++ b/src/vpp-api/client/stat_client.c
@@ -512,6 +512,11 @@ stat_segment_index_to_name_r (uint32_t index, stat_client_main_t * sm)
return 0;
vec = get_stat_vector_r (sm);
ep = vec_elt_at_index (vec, index);
+ if (ep->type == STAT_DIR_TYPE_EMPTY)
+ {
+ stat_segment_access_end (&sa, sm);
+ return 0;
+ }
if (!stat_segment_access_end (&sa, sm))
return 0;
return strdup (ep->name);