From d1a7dbad5df20a3c507b154d0fec512272346055 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 3 Jun 2024 10:20:52 +0800 Subject: [PATCH] Unlink named semaphores after opening them (#4530) --- librz/util/thread_sem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/librz/util/thread_sem.c b/librz/util/thread_sem.c index 85a71ee4417..109ee844bb9 100644 --- a/librz/util/thread_sem.c +++ b/librz/util/thread_sem.c @@ -43,6 +43,7 @@ RZ_API RZ_OWN RzThreadSemaphore *rz_th_sem_new(unsigned int initial) { free(sem); return NULL; } + sem_unlink(name); #else sem->sem = malloc(sizeof(sem_t)); if (!sem->sem) {