api/client: close the returned io.ReadCloser

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
This commit is contained in:
Ma Shimiao
2015-07-08 10:06:25 +08:00
parent 2fe51ecee7
commit 91a496055c
18 changed files with 40 additions and 0 deletions
+2
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
}