mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows: Commit() rwTar defer close
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
72e9e12fa0
commit
f9c7772b83
1 changed files with 5 additions and 1 deletions
|
@ -32,7 +32,11 @@ func (daemon *Daemon) Commit(container *Container, repository, tag, comment, aut
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer rwTar.Close()
|
defer func() {
|
||||||
|
if rwTar != nil {
|
||||||
|
rwTar.Close()
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// Create a new image from the container's base layers + a new layer from container changes
|
// Create a new image from the container's base layers + a new layer from container changes
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Add table
Reference in a new issue