docker-call-close-archive-in-push-v2-image

pushV2Image() calls TarLayer() which returns an archive. One needs to
Close() the archive once done otherwise it will leave mounted devices
if devicemapper graph driver is being used.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> 
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 064ff42d6d34b9c92e634f30ac1549d9786ab26f
Component: engine
This commit is contained in:
Vivek Goyal
2015-02-11 11:30:46 -05:00
parent 6e39a35c8f
commit 5407924e49

View File

@ -392,6 +392,8 @@ func (s *TagStore) pushV2Image(r *registry.Session, img *image.Image, endpoint *
if err != nil {
return err
}
defer arch.Close()
tf, err := s.graph.newTempFile()
if err != nil {
return err