Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Loading certain font files causes kernel panic https://github.com/siyuan-note/siyuan/issues/13739

Daniel2aa264bbeb6e
diff --git a/kernel/util/font.go b/kernel/util/font.go
index f11ca9e75a..49f7bdd9d0 100644
--- a/kernel/util/font.go
+++ b/kernel/util/font.go
@@ -150,6 +150,7 @@ func parseTTFFontFamily(fontPath string) (ret string) {
defer logging.Recover()
fontFile, err := os.Open(fontPath)
+ defer fontFile.Close()
if err != nil {
//LogErrorf("open font file [%s] failed: %s", fontPath, err)
return