From dede3a5d7198b675afd480a4c9aa9715746e3dae Mon Sep 17 00:00:00 2001 From: ComputeryPony Date: Fri, 8 May 2026 17:02:38 -0500 Subject: [PATCH] crypto: implement CTHR_THREAD_CLOSE to avoid leaking memory --- src/crypto/c_threads.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/c_threads.h b/src/crypto/c_threads.h index 3457738b3..d84f7977e 100644 --- a/src/crypto/c_threads.h +++ b/src/crypto/c_threads.h @@ -65,6 +65,6 @@ #define CTHR_THREAD_RETURN return NULL #define CTHR_THREAD_CREATE(thr, func, arg) (pthread_create(&thr, NULL, func, arg) == 0) #define CTHR_THREAD_JOIN(thr) pthread_join(thr, NULL) -#define CTHR_THREAD_CLOSE(thr) +#define CTHR_THREAD_CLOSE(thr) pthread_detach(thr) #endif