From 8cad9840fa4f5c28ea745aab88e5f98e846f0c0e Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Thu, 24 Aug 2017 16:37:56 -0700 Subject: [PATCH] utils: Fix close conn after starting scope This fixes the goroutine leak in cri-o. Signed-off-by: Mrunal Patel --- utils/utils.go | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/utils.go b/utils/utils.go index dec3a1fe..9b7cebfe 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -64,6 +64,7 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error { if err != nil { return err } + defer conn.Close() // Block until job is started <-ch