diff --git a/src/build/libroot/sem.cpp b/src/build/libroot/sem.cpp index 9935724f8d..22c6725f50 100644 --- a/src/build/libroot/sem.cpp +++ b/src/build/libroot/sem.cpp @@ -1,6 +1,7 @@ #include +#include #include #include @@ -56,6 +57,8 @@ delete_sem(sem_id id) return B_BAD_SEM_ID; sSemaphores[id].inUse = false; + free(sSemaphores[id].name); + sSemaphores[id].name = NULL; return B_OK; }