summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vppinfra/sparse_vec.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vppinfra/sparse_vec.h b/src/vppinfra/sparse_vec.h
index 1f57d304e95..3bd440d5dbd 100644
--- a/src/vppinfra/sparse_vec.h
+++ b/src/vppinfra/sparse_vec.h
@@ -225,7 +225,10 @@ sparse_vec_index2 (void *v,
{ \
if (V) \
{ \
- clib_mem_free (sparse_vec_header (V)); \
+ sparse_vec_header_t *_h = sparse_vec_header (V); \
+ vec_free (_h->is_member_bitmap); \
+ vec_free (_h->member_counts); \
+ clib_mem_free (_h); \
V = 0; \
} \
} \