From 04f92275452dbe6733a4c6050f17f8413eaee573 Mon Sep 17 00:00:00 2001 From: guangwu Date: Wed, 15 May 2024 13:18:57 +0800 Subject: [PATCH] fix: close notebook main file --- src/core/httphandler/notebook.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/httphandler/notebook.go b/src/core/httphandler/notebook.go index 5c958ce..5a487ce 100644 --- a/src/core/httphandler/notebook.go +++ b/src/core/httphandler/notebook.go @@ -58,6 +58,7 @@ func GetFileContent(abspath string) (string, error) { if err != nil { return "", pkgErrors.Wrapf(err, "Could not open notebook main file %s; ", abspath) } + defer f.Close() content, err := ioutil.ReadAll(f) if err != nil {