From 6bc10169b33cbaf0af7c494364604b332f9a4245 Mon Sep 17 00:00:00 2001 From: Viktor Oreshkin Date: Mon, 20 Jul 2020 06:15:48 +0300 Subject: [PATCH] Cloudflare: fix http response Body leak --- lib/providers/cloudflare/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/providers/cloudflare/api.go b/lib/providers/cloudflare/api.go index a566000..fc7c714 100644 --- a/lib/providers/cloudflare/api.go +++ b/lib/providers/cloudflare/api.go @@ -87,6 +87,7 @@ func (api *CloudflareAPI) request(method string, uri string, body io.Reader) ([] if err != nil { return nil, err } + defer resp.Body.Close() if resp.StatusCode != http.StatusOK { panic("Status code not 200")