stats: check if stats vector entry is empty
[vpp.git] / src / vpp / app / vpp_get_stats.c
index a37dfca..54d36ab 100644 (file)
@@ -179,6 +179,8 @@ reconnect:
       for (i = 0; i < vec_len (dir); i++)
        {
          char *n = stat_segment_index_to_name (dir[i]);
+         if (!n)
+           continue;
          printf ("%s\n", n);
          free (n);
        }