Skip to content

Commit

Permalink
fix(ffi): fix bad access (#3772)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi authored Jan 28, 2022
1 parent 1c65959 commit 2a41f22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base_layer/wallet_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ pub unsafe extern "C" fn commitment_signature_create_from_bytes(
return ptr::null_mut();
}

let nonce = match Commitment::from_bytes(&(*public_nonce_bytes).0) {
let nonce = match Commitment::from_bytes(&(*public_nonce_bytes).0.clone()) {
Ok(nonce) => nonce,
Err(e) => {
error!(
Expand All @@ -931,7 +931,7 @@ pub unsafe extern "C" fn commitment_signature_create_from_bytes(
return ptr::null_mut();
},
};
let u = match TariPrivateKey::from_bytes(&(*u_bytes).0) {
let u = match TariPrivateKey::from_bytes(&(*u_bytes).0.clone()) {
Ok(u) => u,
Err(e) => {
error!(
Expand All @@ -943,7 +943,7 @@ pub unsafe extern "C" fn commitment_signature_create_from_bytes(
return ptr::null_mut();
},
};
let v = match TariPrivateKey::from_bytes(&(*v_bytes).0) {
let v = match TariPrivateKey::from_bytes(&(*v_bytes).0.clone()) {
Ok(u) => u,
Err(e) => {
error!(
Expand Down

0 comments on commit 2a41f22

Please sign in to comment.