aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/client/stat_client.c
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2020-08-10 16:25:21 +0200
committerOle Troan <ot@cisco.com>2020-08-10 17:29:09 +0200
commit3c70c05e1f330ed0034319252c3dcd565cf13d6b (patch)
treed3af80d8a2f125a02a5d788aa063b96a02fadc16 /src/vpp-api/client/stat_client.c
parent53ec96777c32d610c7bc2d387d2c098749d49a18 (diff)
stats: name and error index client memory leak
Type: fix Change-Id: I6c9999b93d4f4ad4b8540a21e793c9a90e7c8ecf Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp-api/client/stat_client.c')
-rw-r--r--src/vpp-api/client/stat_client.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vpp-api/client/stat_client.c b/src/vpp-api/client/stat_client.c
index 9c6ff33c2d1..3d1bffc2d5f 100644
--- a/src/vpp-api/client/stat_client.c
+++ b/src/vpp-api/client/stat_client.c
@@ -301,8 +301,16 @@ stat_segment_data_free (stat_segment_data_t * res)
vec_free (res[i].combined_counter_vec[j]);
vec_free (res[i].combined_counter_vec);
break;
+ case STAT_DIR_TYPE_NAME_VECTOR:
+ for (j = 0; j < vec_len (res[i].name_vector); j++)
+ vec_free (res[i].name_vector[j]);
+ vec_free (res[i].name_vector);
+ break;
+ case STAT_DIR_TYPE_ERROR_INDEX:
+ vec_free (res[i].error_vector);
+ break;
default:
- ;
+ assert (0);
}
free (res[i].name);
}