Fix minor resource leak in notifyAudit.

This would leak a response body on each valid, non-200 status response.

V12-Ref: F-77171
This commit is contained in:
Catherine
2026-05-30 18:10:43 +00:00
parent 00567a5257
commit c181e86f48
+1 -1
View File
@@ -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))