mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin,crypto: fix problems detected by -fsanitize=address,undefined and -fsanitize=memory
This commit is contained in:
@ -506,7 +506,8 @@ pub fn (a &array) free() {
|
||||
// if a.is_slice {
|
||||
// return
|
||||
// }
|
||||
unsafe { free(&byte(a.data) - a.offset) }
|
||||
mblock_ptr := &byte(u64(a.data) - u64(a.offset))
|
||||
unsafe { free(mblock_ptr) }
|
||||
}
|
||||
|
||||
// filter creates a new array with all elements that pass the test implemented by the provided function
|
||||
|
Reference in New Issue
Block a user