oracle: Fix missing close calls
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
ce1df55da0
commit
b2e34747d2
@ -165,16 +165,19 @@ func (s *OracleLinuxHTTP) unpackISO(latestUpdate, filePath, rootfsDir string) er
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rpmFile.Close()
|
||||
|
||||
_, err = lxd.DownloadFileHash(http.DefaultClient, "", nil, nil, yumFileName, fmt.Sprintf("%s/%s", baseURL, yumPkg), "", nil, yumFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
yumFile.Close()
|
||||
|
||||
_, err = lxd.DownloadFileHash(http.DefaultClient, "", nil, nil, gpgFileName, "https://oss.oracle.com/ol6/RPM-GPG-KEY-oracle", "", nil, gpgFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
gpgFile.Close()
|
||||
|
||||
// Setup the mounts and chroot into the rootfs
|
||||
exitChroot, err := shared.SetupChroot(tempRootDir, shared.DefinitionEnv{})
|
||||
|
Loading…
x
Reference in New Issue
Block a user