Skip to content

Commit

Permalink
[Bug] Remove clean-up of img after ScanContainer is called. Clean…
Browse files Browse the repository at this point in the history
…-up should be done by the caller of the function.

PiperOrigin-RevId: 715613761
  • Loading branch information
Mario Leyva authored and copybara-github committed Jan 15, 2025
1 parent 9491c94 commit 40d067f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions scalibr.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ func (Scanner) Scan(ctx context.Context, config *ScanConfig) (sr *ScanResult) {
// details. Functions to create an Image from a tarball, remote name, or v1.Image are available in
// the artifact/image/layerscanning/image package.
func (s Scanner) ScanContainer(ctx context.Context, img *image.Image, config *ScanConfig) (sr *ScanResult, err error) {
defer img.CleanUp()

chainLayers, err := img.ChainLayers()
if err != nil {
return nil, fmt.Errorf("failed to get chain layers: %w", err)
Expand Down

0 comments on commit 40d067f

Please sign in to comment.