From 0af04b613220060ef1fc21ca2f1d551f8f868af8 Mon Sep 17 00:00:00 2001 From: allencloud Date: Wed, 6 Jul 2016 07:00:39 +0800 Subject: [PATCH] fix severe fd leak in stack Signed-off-by: allencloud --- api/client/stack/opts.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/client/stack/opts.go b/api/client/stack/opts.go index 5cabe5c432..81af1dfe2f 100644 --- a/api/client/stack/opts.go +++ b/api/client/stack/opts.go @@ -35,6 +35,7 @@ func loadBundlefile(stderr io.Writer, namespace string, path string) (*bundlefil if err != nil { return nil, err } + defer reader.Close() bundle, err := bundlefile.LoadFile(reader) if err != nil {