From 27d6334ddb714940b5eece8394125c75037c5a06 Mon Sep 17 00:00:00 2001 From: Sam Gunaratne Date: Mon, 8 Jul 2024 11:21:16 -0600 Subject: [PATCH] Add missing file close --- cf/api/buildpack_bits.go | 1 + 1 file changed, 1 insertion(+) 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)