From: Mounir IDRASSI Date: Thu, 16 Apr 2026 07:08:01 +0000 (+0900) Subject: crypto/hashtable/hashtable.c: fix hashtable grow cleanup for aligned allocation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82d4bd5e977b8bbbbb566a0b028698591d988e9f;p=thirdparty%2Fopenssl.git 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 Reviewed-by: Nikola Pajkovsky Reviewed-by: Saša Nedvědický Reviewed-by: Eugene Syromiatnikov 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 065174feb78..5ed956e2ed5 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; }