From 53a0fdf1bee795048b3b3a40f8ffec3e3f8473a2 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 3 Jun 2016 06:11:54 +0200 Subject: [PATCH] Init "locked" flag for SysV semaphores --- libraries/liblmdb/mdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 79a958b0ff..29ca141c45 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -4960,6 +4960,8 @@ mdb_env_setup_locks(MDB_env *env, char *lpath, int mode, int *excl) if (semctl(semid, 0, SETALL, semu) < 0) goto fail_errno; env->me_txns->mti_semid = semid; + env->me_txns->mti_rlocked = 0; + env->me_txns->mti_wlocked = 0; #else /* MDB_USE_POSIX_MUTEX: */ pthread_mutexattr_t mattr; -- 2.39.5