From 96b6a9fc6b98ead07237f278be9055cd28fe9cf3 Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 19 Aug 2016 23:02:49 +1000 Subject: [PATCH] ckdb - missing lock on users access - part 2 :) --- src/ckdb_dbio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ckdb_dbio.c b/src/ckdb_dbio.c index ec866d05..393a8b2e 100644 --- a/src/ckdb_dbio.c +++ b/src/ckdb_dbio.c @@ -649,7 +649,9 @@ K_ITEM *users_add(PGconn *conn, char *username, char *emailaddress, * and thus throw away any differences in the 2nd */ K_WLOCK(users_db_free); + K_RLOCK(users_free); item = find_users(username); + K_RUNLOCK(users_free); if (item) { ok = true; goto already;