Skip to content

Commit

Permalink
fixing SIGSEGV when running containers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
yastij committed Jul 6, 2017
1 parent 1aa82bc commit 45b0e7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/command/container/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,11 @@ func runContainer(dockerCli *command.DockerCli, opts *runOptions, copts *contain
}

close, err := attachContainer(ctx, dockerCli, &errCh, config, createResponse.ID)
defer close()

if err != nil {
return err
}
defer close()
}

statusChan := waitExitOrRemoved(ctx, dockerCli, createResponse.ID, copts.autoRemove)
Expand Down

0 comments on commit 45b0e7c

Please sign in to comment.