From f79b457b447e5a26887e820756d2a1f26f3e0f48 Mon Sep 17 00:00:00 2001 From: Stacy Prowell Date: Sun, 2 Feb 2025 18:48:18 -0500 Subject: [PATCH] Fixed memory leak On deleting a table capacity was zeroed too early --- src/he4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/he4.c b/src/he4.c index 1c4b8c1..df96b95 100644 --- a/src/he4.c +++ b/src/he4.c @@ -264,11 +264,11 @@ he4_delete(HE4 * table) { } // Delete any remaining entries. - table->free = 0; - table->capacity = 0; for (size_t index = 0; index < table->capacity; ++index) { empty_cell(table, index, true, true); } // Delete any remaining entries. + table->free = 0; + table->capacity = 0; // Wipe the method table. table->compare = NULL;