Commit 82d4bd5e97 for openssl.org
commit 82d4bd5e977b8bbbbb566a0b028698591d988e9f
Author: Mounir IDRASSI <mounir.idrassi@idrix.fr>
Date: Thu Apr 16 16:08:01 2026 +0900
crypto/hashtable/hashtable.c: fix hashtable grow cleanup for aligned allocation
Update grow_hashtable cleanup to free the neighborhood allocation
through newmd->neighborhood_ptr_to_free instead of newmd->neighborhoods.
Fixes: cc4ea5e00028 "Introduce new internal hashtable implementation"
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Sun Apr 26 14:26:08 2026
(Merged from https://github.com/openssl/openssl/pull/30859)
diff --git a/crypto/hashtable/hashtable.c b/crypto/hashtable/hashtable.c
index 065174feb7..5ed956e2ed 100644
--- a/crypto/hashtable/hashtable.c
+++ b/crypto/hashtable/hashtable.c
@@ -507,7 +507,7 @@ static int grow_hashtable(HT *h, size_t oldsize)
}
if (rehashed == 0) {
/* we ran out of space in a neighborhood, grow again */
- OPENSSL_free(newmd->neighborhoods);
+ OPENSSL_free(newmd->neighborhood_ptr_to_free);
OPENSSL_free(newmd);
return grow_hashtable(h, newsize);
}
@@ -538,7 +538,7 @@ static int grow_hashtable(HT *h, size_t oldsize)
out:
return rc;
out_free:
- OPENSSL_free(newmd->neighborhoods);
+ OPENSSL_free(newmd->neighborhood_ptr_to_free);
OPENSSL_free(newmd);
goto out;
}