From 0dcb53d2903b2802cd3fb528e64aa2614d7803ce Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 21 Feb 2019 10:47:34 +0900 Subject: [PATCH] shareable: Bug fix: Node-leak when extending a page This is very rare and not so serious I think, but is still a bug. --- internal/shareable/shareable.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/shareable/shareable.go b/internal/shareable/shareable.go index 064705a60..d07788cc0 100644 --- a/internal/shareable/shareable.go +++ b/internal/shareable/shareable.go @@ -54,6 +54,7 @@ func (b *backend) TryAlloc(width, height int) (*packing.Node, bool) { } nExtended++ if n := page.Alloc(width, height); n != nil { + page.Free(n) break } }