From 86a0771f9be8c81355493d14226faf98cebe7f14 Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Wed, 7 Oct 2015 15:17:27 -0700 Subject: [PATCH] remote: close response body during watch() --- remote/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/remote/client.go b/remote/client.go index be375b2642..6d466932ce 100644 --- a/remote/client.go +++ b/remote/client.go @@ -180,6 +180,7 @@ func (m *RemoteManager) WatchLeases(ctx context.Context, network string, cursor if err != nil { return subnet.WatchResult{}, err } + defer resp.Body.Close() if resp.StatusCode != http.StatusOK { return subnet.WatchResult{}, httpError(resp)