Skip to content

Commit c4eb0c6

Browse files
committed
libct: createExecFifo: optimize
Every time we call container.Config(), a new copy of struct Config is created and returned, and we do it twice here. Accessing container.config directly fixes this. Fixes: 805b8c7 ("Do not create exec fifo in factory.Create") Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 5d2e244 commit c4eb0c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcontainer/container_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,11 @@ func (c *Container) signal(s os.Signal) error {
432432
}
433433

434434
func (c *Container) createExecFifo() (retErr error) {
435-
rootuid, err := c.Config().HostRootUID()
435+
rootuid, err := c.config.HostRootUID()
436436
if err != nil {
437437
return err
438438
}
439-
rootgid, err := c.Config().HostRootGID()
439+
rootgid, err := c.config.HostRootGID()
440440
if err != nil {
441441
return err
442442
}

0 commit comments

Comments
 (0)