From 2124a70e5431abf11b97ebb89d1f20f23f0845ea Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Thu, 2 Mar 2023 21:16:02 +0300 Subject: [PATCH] daemon.c: fixed heap manipulations with mutex held --- src/microhttpd/daemon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 97054e59..c9c0d51c 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c @@ -483,10 +483,11 @@ MHD_ip_limit_del (struct MHD_Daemon *daemon, tdelete (found_key, &daemon->per_ip_connection_count, &MHD_ip_addr_compare); + MHD_ip_count_unlock (daemon); free (found_key); } - - MHD_ip_count_unlock (daemon); + else + MHD_ip_count_unlock (daemon); }