diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -222,10 +222,10 @@ func readContents(path string) ([]byte, error) {
 	if err != nil {
 		return nil, err
 	}
+	defer res.Body.Close()
 	if res.StatusCode != http.StatusOK {
 		return nil, fmt.Errorf("status %s", res.Status)
 	}
-	defer res.Body.Close()
 	return ioutil.ReadAll(res.Body)
 }
close the response body regardless of the status code

Change-Id: Ieb4aecebfa<I>a<I>adca<I>e<I>f2b<I>