From e4ca21fa2eb5aa45582bcead2e01d9849e54e259 Mon Sep 17 00:00:00 2001 From: Ali Mashtizadeh Date: Mon, 21 Aug 2023 18:36:54 -0400 Subject: [PATCH] Destroy spinlock when destroying the semaphore --- sys/kern/semaphore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/semaphore.c b/sys/kern/semaphore.c index 0acd2f0..1d91bbb 100644 --- a/sys/kern/semaphore.c +++ b/sys/kern/semaphore.c @@ -37,6 +37,8 @@ Semaphore_Destroy(Semaphore *sema) Spinlock_Lock(&semaListLock); LIST_REMOVE(sema, semaphoreList); Spinlock_Unlock(&semaListLock); + + Spinlock_Destroy(&sema->lock); } void