1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
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

View File

@ -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 {