From 1421c478fd12003a2a3e70e45000fed8f396fdf1 Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Mon, 9 Jan 2023 19:16:12 +0000 Subject: [PATCH] Fix bug where malformed requests cause Db locks that are never unlocked. --- src/UserInteractiveAuth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/UserInteractiveAuth.c b/src/UserInteractiveAuth.c index 67f0cda..6440463 100644 --- a/src/UserInteractiveAuth.c +++ b/src/UserInteractiveAuth.c @@ -125,6 +125,7 @@ UserInteractiveAuth(HttpServerContext * context, Db * db, /* Check to see if session exists */ if (!ref || !HashMapGet(DbJson(ref), sessionStr)) { + DbUnlock(db, ref); HttpResponseStatus(context, HTTP_BAD_REQUEST); return MatrixErrorCreate(M_UNKNOWN); }