third_party/heimdal: Don't refer to errno when the pthread library fails
authorMIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
Fri, 25 Mar 2022 01:58:28 +0000 (10:58 +0900)
committerStefan Metzmacher <metze@samba.org>
Wed, 22 May 2024 06:46:45 +0000 (08:46 +0200)
When the pthread library fails, an operation refer to errno.
Fix to refer to the return code of the pthread library instead of errno.

Signed-off-by: MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
third_party/heimdal/lib/ipc/common.c

index cfbe4b5b96fd22ad0f50e43959a08e6c71d95cdd..aa26c1a73bd800775e92885af523818905f35eb8 100644 (file)
@@ -150,7 +150,7 @@ heim_ipc_semaphore_wait(heim_isemaphore s, time_t t)
        }
        if (ret) {
            HEIMDAL_MUTEX_unlock(&s->mutex);
-           return errno;
+           return ret;
        }
     }
     HEIMDAL_MUTEX_unlock(&s->mutex);