mirror of https://github.com/docker/cli.git
fixing SIGSEGV when running containers
Signed-off-by: Yassine TIJANI <yasstij11@gmail.com> moving the deffering of the close after the error checking Signed-off-by: Yassine TIJANI <yasstij11@gmail.com> fixing SIGSEGV when running containers Signed-off-by: Yassine TIJANI <yasstij11@gmail.com>
This commit is contained in:
parent
1aa82bc7df
commit
45b0e7cf1a
|
@ -190,10 +190,11 @@ func runContainer(dockerCli *command.DockerCli, opts *runOptions, copts *contain
|
||||||
}
|
}
|
||||||
|
|
||||||
close, err := attachContainer(ctx, dockerCli, &errCh, config, createResponse.ID)
|
close, err := attachContainer(ctx, dockerCli, &errCh, config, createResponse.ID)
|
||||||
defer close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer close()
|
||||||
}
|
}
|
||||||
|
|
||||||
statusChan := waitExitOrRemoved(ctx, dockerCli, createResponse.ID, copts.autoRemove)
|
statusChan := waitExitOrRemoved(ctx, dockerCli, createResponse.ID, copts.autoRemove)
|
||||||
|
|
Loading…
Reference in New Issue