Skip to content

Commit

Permalink
U
Browse files Browse the repository at this point in the history
  • Loading branch information
silathdiir committed Oct 23, 2023
1 parent fe91275 commit 806691f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions common/libzkp/impl/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ pub(crate) static OUTPUT_DIR: Lazy<Option<String>> =

/// # Safety
#[no_mangle]
pub unsafe extern "C" fn free_c_chars(ptr: *mut c_char) {
let _ = CString::from_raw(ptr);
pub extern "C" fn free_c_chars(ptr: *mut c_char) {
log::info!("free_c_chars BEGIN");
if !ptr.is_null() {
unsafe {
let _ = CString::from_raw(ptr);
}
}
log::info!("free_c_chars END");
}

pub(crate) fn c_char_to_str(c: *const c_char) -> &'static str {
Expand Down

0 comments on commit 806691f

Please sign in to comment.