stats: fix memory leak in stat_segment_dump_r()
[vpp.git] / src / vpp-api / client / stat_client.c
index 1c31ea0..359813f 100644 (file)
@@ -433,6 +433,8 @@ stat_segment_dump_r (uint32_t * stats, stat_client_main_t * sm)
 
   fprintf (stderr, "Epoch changed while reading, invalid results\n");
   // TODO increase counter
+  if (res)
+    stat_segment_data_free (res);
   return 0;
 }