From c181e86f48e647522b9aad0c6e9e13c9dedf43a6 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sat, 30 May 2026 14:57:37 +0000 Subject: [PATCH] Fix minor resource leak in `notifyAudit`. This would leak a response body on each valid, non-200 status response. V12-Ref: F-77171 --- src/audit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audit.go b/src/audit.go index 1aa454c..4dc75fe 100644 --- a/src/audit.go +++ b/src/audit.go @@ -337,8 +337,8 @@ func notifyAudit(ctx context.Context, id AuditID) { resp, err := http.Get(notifyURL.String()) var body []byte if err == nil { - defer resp.Body.Close() body, _ = io.ReadAll(resp.Body) + resp.Body.Close() } if err == nil && resp.StatusCode == http.StatusOK { logc.Printf(ctx, "audit notify %s ok: %s\n", id, string(body))