mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-30 16:51:41 +00:00
Correct check for invalid semaphore on sem_destroy() (s/==/!=/).
Reported by: kris
This commit is contained in:
parent
9b705967d2
commit
08a6a888da
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125509
@ -162,7 +162,7 @@ __sem_destroy(sem_t *sem)
|
||||
{
|
||||
int retval;
|
||||
|
||||
if (sem_check_validity(sem) == 0)
|
||||
if (sem_check_validity(sem) != 0)
|
||||
return (-1);
|
||||
|
||||
_pthread_mutex_lock(&(*sem)->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user