api/client: close the returned io.ReadCloser
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com> Upstream-commit: 91a496055c3e45ab3fba8e643475adb618581e1f Component: engine
This commit is contained in:
@ -71,6 +71,8 @@ func (cli *DockerCli) CmdCommit(args ...string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
defer stream.Close()
|
||||
|
||||
if err := json.NewDecoder(stream).Decode(&response); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user