mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 03:55:23 +00:00
fix: close res body (#5025)
This commit is contained in:
parent
d576db3893
commit
431d3fa2d9
@ -131,7 +131,8 @@ func (exporter *Exporter) Export(event *output.ResultEvent) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer res.Body.Close()
|
||||
|
||||
b, err = io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return errors.New(err.Error() + "error thrown by elasticsearch " + string(b))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user