git » libfilo » commit 79fe123

Destroy the semaphore in wait_on().

author Alberto Bertogli
2005-07-23 20:09:35 UTC
committer Alberto Bertogli
2005-07-23 20:09:35 UTC
parent 00b825b9daebdd1cbd5fcf6714b8478fd27005de

Destroy the semaphore in wait_on().

libfilo.c +3 -0

diff --git a/libfilo.c b/libfilo.c
index 88bd987..c35f833 100644
--- a/libfilo.c
+++ b/libfilo.c
@@ -362,6 +362,9 @@ static void wait_on(filock_t *fl, off_t start, off_t end, int mode)
 		/* it can fail with EINTR, retry */
 		;
 
+	if (sem_destroy(&(wr->sem)) != 0)
+		printd("ERROR IN DESTROY\n");
+
 	free(wr);
 }