Closed antonok-edm closed 4 years ago
As per https://doc.rust-lang.org/std/ffi/struct.CString.html#method.into_raw, free should not be called on strings passed across the FFI. They should be passed back and reconstructed into CStrings so that Rust can deallocate them properly.
free
CString
My fault for not noticing that you'd already added c_char_buffer_destroy for this purpose!
c_char_buffer_destroy
As per https://doc.rust-lang.org/std/ffi/struct.CString.html#method.into_raw,
free
should not be called on strings passed across the FFI. They should be passed back and reconstructed intoCString
s so that Rust can deallocate them properly.My fault for not noticing that you'd already added
c_char_buffer_destroy
for this purpose!