There was an error while loading. Please reload this page.
1 parent 057d85e commit 2ca0e94Copy full SHA for 2ca0e94
1 file changed
datadog-sidecar-ffi/src/span.rs
@@ -218,9 +218,10 @@ pub unsafe extern "C" fn ddog_free_charslice(slice: CharSlice<'static>) {
218
return;
219
}
220
221
- // Safety: the owned char slices returned by functions of this API are `Box`-allocated.
+ // Safety: the owned char slices returned by functions comes from `CString::into_raw` in
222
+ // `ddog_span_debug_log`.
223
unsafe {
- let _ = Box::from_raw(ptr as *mut c_char);
224
+ let _ = CString::from_raw(ptr as *mut c_char);
225
226
227
0 commit comments