From 5be982d63e031367c629b899232750a21e46ded3 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 10 Jun 2021 14:21:57 +0200 Subject: [PATCH] builtin: fix memory leak on empty strings (#10408) --- vlib/builtin/string.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/builtin/string.v b/vlib/builtin/string.v index 1b6e58a0c3..d8c48fb729 100644 --- a/vlib/builtin/string.v +++ b/vlib/builtin/string.v @@ -1491,7 +1491,7 @@ pub fn (s &string) free() { } return } - if s.is_lit == 1 || s.len == 0 || s.str == 0 { + if s.is_lit == 1 || s.str == 0 { return } unsafe {