]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
crypto/hashtable/hashtable.c: fix hashtable grow cleanup for aligned allocation
authorMounir IDRASSI <mounir.idrassi@idrix.fr>
Thu, 16 Apr 2026 07:08:01 +0000 (16:08 +0900)
committerEugene Syromiatnikov <esyr@openssl.org>
Sun, 26 Apr 2026 14:25:24 +0000 (16:25 +0200)
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)

crypto/hashtable/hashtable.c

index 065174feb78ebac44405f7af3907af8edebc005d..5ed956e2ed5dfec659e32db09f05ecadc0a61bb0 100644 (file)
@@ -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;
 }