From 485d2d86befb025d20988a7554ee961f8d28872e Mon Sep 17 00:00:00 2001 From: Pranas Kiziela Date: Fri, 15 Nov 2019 16:01:19 +0200 Subject: [PATCH] Close response body --- response.go | 1 + 1 file changed, 1 insertion(+) diff --git a/response.go b/response.go index 473797d..97b0113 100644 --- a/response.go +++ b/response.go @@ -243,6 +243,7 @@ func (r *Response) AttachmentData(dataType AttachmentType, filename string, file if err != nil { return err } + defer resp.Body.Close() return checkFacebookError(resp.Body) }