From 01c64fe1029cea731d4f706f6599643d00748388 Mon Sep 17 00:00:00 2001 From: Vlad Khorsun Date: Tue, 12 Nov 2024 13:57:02 +0200 Subject: [PATCH] Fixed bug #8315 : Crash at database restore due to failed system call --- src/burp/BurpTasks.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/burp/BurpTasks.h b/src/burp/BurpTasks.h index 7579a4b5a9..f33b51500f 100644 --- a/src/burp/BurpTasks.h +++ b/src/burp/BurpTasks.h @@ -545,7 +545,13 @@ public: if (!m_mutex.tryEnter(FB_FUNCTION)) return; + fb_assert(m_locked >= 0); + const bool lockedByMe = (m_locked != 0); + m_mutex.leave(); + + if (!lockedByMe) + return; } fb_assert(m_locked > 0);