From a070b0de9f9e9cbca150eea4eda74757ca588bed Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Wed, 23 Sep 2020 17:50:52 +0200 Subject: [HICN-645] Control plane (WIP) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4be6a40b690b62f22f57de6d8c10b01a1be42a6d Signed-off-by: Jordan Augé Signed-off-by: Enrico Loparco (eloparco) Signed-off-by: Mauro Sardara --- hicn-light/src/hicn/base/pool.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'hicn-light/src/hicn/base/pool.c') 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; } -- cgit 1.2.3-korg