aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/base/pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/hicn/base/pool.c')
-rw-r--r--hicn-light/src/hicn/base/pool.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hicn-light/src/hicn/base/pool.c b/hicn-light/src/hicn/base/pool.c
index 31abb13f1..cb650b9e5 100644
--- a/hicn-light/src/hicn/base/pool.c
+++ b/hicn-light/src/hicn/base/pool.c
@@ -16,7 +16,7 @@
/**
* \file pool.c
* \brief Implementation of fixed-size pool allocator.
- *
+ *
* NOTE:
* - Ideally, we should have a single realloc per resize, that would encompass
* both the free indices vector and bitmap, by nesting data structures. Because
@@ -81,6 +81,10 @@ ERR_MAX_SIZE:
void
_pool_free(void ** pool_ptr)
{
+ pool_hdr_t * ph = pool_hdr(*pool_ptr);
+ vector_free(ph->free_indices);
+ bitmap_free(ph->free_bitmap);
+
free(pool_hdr(*pool_ptr));
*pool_ptr = NULL;
}