Skip to main content

ffi_free_bytes

Function ffi_free_bytes 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ffi_free_bytes(ptr: *mut u8, _len: usize)
Expand description

Frees a byte buffer (unsigned char * / uint8_t *) previously returned by an FFI function in this library (which allocated it using libc::malloc). Does nothing if ptr is null. The len argument is ignored but kept for potential C-side compatibility if callers expect it.

ยงSafety

  • ptr must be null or must have been previously allocated by a function in this library that returns *mut u8 (eg, ffi_agent_sign, ffi_export_encrypted_key).
  • ptr must not be used after calling this function.