bugfix: Close tempfile after writting

This commit is contained in:
Felipe M 2021-01-14 23:07:07 +01:00
parent 2b28de7403
commit ce81ba63b3
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,8 @@ func DownloadURLIntoTempFile(requestURL string) (string, error) {
return "", err
}
defer tmpfile.Close()
body, err := ioutil.ReadAll(response.Body)
if err != nil {
return "", err