builtin: fix memory leak on empty strings (#10408)

pull/10411/head
pancake 2021-06-10 14:21:57 +02:00 committed by GitHub
parent 9d6b8830da
commit 5be982d63e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1491,7 +1491,7 @@ pub fn (s &string) free() {
} }
return return
} }
if s.is_lit == 1 || s.len == 0 || s.str == 0 { if s.is_lit == 1 || s.str == 0 {
return return
} }
unsafe { unsafe {