Free data with underlying vec with vec recreation

This commit is contained in:
Jackson Coxson
2025-12-13 13:08:33 -07:00
parent 9776516544
commit 44e8b83698
2 changed files with 2 additions and 2 deletions

View File

@@ -414,7 +414,7 @@ pub unsafe extern "C" fn idevice_string_free(string: *mut c_char) {
#[unsafe(no_mangle)]
pub unsafe extern "C" fn idevice_data_free(data: *mut u8, len: usize) {
if !data.is_null() {
let _ = unsafe { std::slice::from_raw_parts(data, len) };
let _ = unsafe { Vec::from_raw_parts(data, len, len) };
}
}