diff --git a/src/rust/src/ffi_alloc.rs b/src/rust/src/ffi_alloc.rs index 9a1a0b54..c2ed1615 100644 --- a/src/rust/src/ffi_alloc.rs +++ b/src/rust/src/ffi_alloc.rs @@ -4,12 +4,7 @@ extern "C" { fn free(ptr: *mut c_void); } /// Frees memory allocated by C code (malloc/calloc) -/// -/// # Safety -/// -/// The pointer must have been allocated by C's malloc/calloc/realloc and -/// not yet freed. Calling this function with a pointer that was not -/// allocated by the C allocator is undefined behavior. + #[inline] pub unsafe fn c_free(ptr: *mut T) { if !ptr.is_null() {