diff --git a/cf/api/buildpack_bits.go b/cf/api/buildpack_bits.go index a3dd4416071..da6efd357eb 100644 --- a/cf/api/buildpack_bits.go +++ b/cf/api/buildpack_bits.go @@ -108,6 +108,7 @@ func (repo CloudControllerBuildpackBitsRepository) CreateBuildpackZipFile(buildp if err != nil { return nil, "", fmt.Errorf("%s: %s", T("Couldn't open buildpack file"), err.Error()) } + defer specifiedFile.Close() err = normalizeBuildpackArchive(specifiedFile, zipFileToUpload) if err != nil { return nil, "", zipErrorHelper(err)