Skip to content

Commit

Permalink
RHINENG-7099: fix evaluator-recalc nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
Dugowitch authored and psegedy committed Mar 8, 2024
1 parent a521ad7 commit 6534496
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/utils/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ func HTTPCallRetry(ctx context.Context, httpCallFun func() (outputDataPtr interf
}

responseDetails := tryGetResponseDetails(resp)
resp.Body.Close()
if resp != nil {
resp.Body.Close()
}
return nil, errors.Wrap(callErr, "HTTP call failed"+responseDetails)
}
return nil, errors.Errorf("HTTP retry call failed, attempts: %d", attempt)
Expand Down

0 comments on commit 6534496

Please sign in to comment.