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:
Ma Shimiao
2015-07-03 14:19:23 +08:00
parent 78101e16cc
commit a462e56268
18 changed files with 40 additions and 0 deletions

View File

@ -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
}