]> git.ipfire.org Git - thirdparty/openssl.git/commit
Free hashtable prior to freeing atomic worker_lock
authorNeil Horman <nhorman@openssl.org>
Mon, 17 Feb 2025 15:13:32 +0000 (10:13 -0500)
committerTomas Mraz <tomas@openssl.org>
Tue, 18 Feb 2025 15:40:40 +0000 (16:40 +0100)
commitb1895255b9ac7ec8fd559a59b96a9878c825bc61
treec2be4f9f7cbe068b006517446cd992da1091f86b
parentec7c1ca8794eb9f80542d8d1df33ca65554e58a0
Free hashtable prior to freeing atomic worker_lock

lhash_test uses a hashtable that may not be empty at the end of the test

Given that the free function frees the elements in the list and uses the
atomic worker_lock to do so, we need to free the hash table prior to
freeing the working lock to avoid the use of unallocated memory.

Fixes #26798

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26800)

(cherry picked from commit 1636ae1a9022bad2fd5cf20f45e2729a55e688b7)
test/lhash_test.c