From e78dc4d682b0a52367523e9d08e3f69a5d83732c Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 1 Jul 2020 16:51:59 +0200 Subject: [PATCH] strings: fix a leak in builder --- vlib/strings/builder.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/strings/builder.v b/vlib/strings/builder.v index 610c933515..3465506ab7 100644 --- a/vlib/strings/builder.v +++ b/vlib/strings/builder.v @@ -115,9 +115,9 @@ pub fn (mut b Builder) str() string { } b.buf << `\0` s := string(b.buf,b.len) - bis := b.initial_size + //bis := b.initial_size //free(b.buf.data) - b.buf = []byte{cap: bis} + //b.buf = []byte{cap: bis} b.len = 0 return s }