From f73c72d4d794cd7b8f2b8697fdb05b94d808ddee Mon Sep 17 00:00:00 2001 From: ComputeryPony Date: Sun, 3 May 2026 14:44:41 -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 033da25a6..267b91f50 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