From: Eric Wong Date: Sun, 26 Oct 2025 00:16:45 +0000 (+0000) Subject: xap_helper: fix leak from shared reader locks X-Git-Tag: v2.0.0~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af041ab52494308707656166518d88f2b0ceeeb6;p=thirdparty%2Fpublic-inbox.git xap_helper: fix leak from shared reader locks Caught by both valgrind and ASan, but I've been forgetting both of them on my ancient laptop :x --- diff --git a/lib/PublicInbox/xap_helper.h b/lib/PublicInbox/xap_helper.h index 658c1cc7f..511ce58ee 100644 --- a/lib/PublicInbox/xap_helper.h +++ b/lib/PublicInbox/xap_helper.h @@ -277,6 +277,7 @@ static void unlock_ensure(void *ptr) for (int i = 0; i < lk->req->lockc; i++) if (lk->lock_fd[i] >= 0) xclose(lk->lock_fd[i]); // implicit LOCK_UN + free(lk); } static struct open_locks *lock_shared_maybe(struct req *req)