From 30bf31010e4a6ca4247eef293a4202f6775d6ec9 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 29 Sep 2021 11:16:33 +0200 Subject: libpod: add execSessionNoCopy To avoid creating an expensive deep copy, create an internal function to access the exec session. [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg --- libpod/container_exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod/container_exec.go') diff --git a/libpod/container_exec.go b/libpod/container_exec.go index 1cb45a118..f99fb7d3f 100644 --- a/libpod/container_exec.go +++ b/libpod/container_exec.go @@ -747,7 +747,7 @@ func (c *Container) Exec(config *ExecConfig, streams *define.AttachStreams, resi return -1, err } - session, err := c.ExecSession(sessionID) + session, err := c.execSessionNoCopy(sessionID) if err != nil { if errors.Cause(err) == define.ErrNoSuchExecSession { // TODO: If a proper Context is ever plumbed in here, we -- cgit v1.2.3-54-g00ecf