summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/oci.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/oci.go b/libpod/oci.go
index 6eaaa7a29..2257cd42f 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -378,6 +378,7 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
childPipe.Close()
return err
}
+ defer cmd.Wait()
// We don't need childPipe on the parent side
childPipe.Close()
@@ -478,6 +479,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container) error {
}
return errors.Wrapf(err, "error getting container %s state. stderr/out: %s", ctr.ID(), out)
}
+ defer cmd.Wait()
errPipe.Close()
out, err := ioutil.ReadAll(outPipe)