From 2fb6cc2ceac680350b403e6173926331d7904722 Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 29 Aug 2019 14:07:02 -0500 Subject: 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 --- pkg/varlinkapi/images.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/varlinkapi') 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 -- cgit v1.2.3-54-g00ecf