summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-08-29 14:07:02 -0500
committerbaude <bbaude@redhat.com>2019-08-29 14:08:29 -0500
commit2fb6cc2ceac680350b403e6173926331d7904722 (patch)
treed6ae928885837db3570a4b0fe9422a5a34f093b3 /pkg
parent4e209fc10a55560ca181207cf43dae0cb0ec9be0 (diff)
downloadpodman-2fb6cc2ceac680350b403e6173926331d7904722.tar.gz
podman-2fb6cc2ceac680350b403e6173926331d7904722.tar.bz2
podman-2fb6cc2ceac680350b403e6173926331d7904722.zip
dont panic when using varlink commit and uppercase image names
when using an upper case image name for container commit, we observed panics due to a channel closing early. Fixes: #3897 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/varlinkapi/images.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index c184155a9..0bdbec177 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -563,7 +563,6 @@ func (i *LibpodAPI) Commit(call iopodman.VarlinkCall, name, imageName string, ch
}
c := make(chan error)
- defer close(c)
go func() {
newImage, err = ctr.Commit(getContext(), imageName, options)
@@ -571,6 +570,7 @@ func (i *LibpodAPI) Commit(call iopodman.VarlinkCall, name, imageName string, ch
c <- err
}
c <- nil
+ close(c)
}()
// reply is the func being sent to the output forwarder. in this case it is replying