Merge pull request #697 from nalind/image-free
Don't double-free an UnparsedSource
This commit is contained in:
commit
f8a822e900
1 changed files with 2 additions and 3 deletions
|
@ -137,10 +137,9 @@ func (svc *imageService) CanPull(imageName string, options *copy.Options) (bool,
|
|||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
unparsedImage := image.UnparsedFromSource(rawSource)
|
||||
defer unparsedImage.Close()
|
||||
src, err := image.FromUnparsedImage(unparsedImage)
|
||||
src, err := image.FromSource(rawSource)
|
||||
if err != nil {
|
||||
rawSource.Close()
|
||||
return false, err
|
||||
}
|
||||
src.Close()
|
||||
|
|
Loading…
Reference in a new issue