(David Lee, <david.lee@teracruz.com>)
This patch fixes a semaphore leak within valgrind. If your application
dynamically allocates/releases semaphores, you will very quickly run out.
Also, as a nice side effect, it implements sem_destroy properly.

(me)
Protect sem_getvalue with a lock/unlock of the semaphore's mutex,
like the other routines do.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2153 a5019735-40e9-0310-863c-91ae7b9d1cf9
2 files changed