aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/launchpad/launchpad_api.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/launchpad/launchpad_api.go')
-rw-r--r--bridge/launchpad/launchpad_api.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/bridge/launchpad/launchpad_api.go b/bridge/launchpad/launchpad_api.go
index 09e02bc5..849ef925 100644
--- a/bridge/launchpad/launchpad_api.go
+++ b/bridge/launchpad/launchpad_api.go
@@ -129,11 +129,12 @@ func (lapi *launchpadAPI) SearchTasks(project string) ([]LPBug, error) {
return nil, err
}
- defer resp.Body.Close()
-
var result launchpadAnswer
- if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
+ err = json.NewDecoder(resp.Body).Decode(&result)
+ _ = resp.Body.Close()
+
+ if err != nil {
return nil, err
}