Skip to content

Commit

Permalink
Fixed memory leak in z85_decode.
Browse files Browse the repository at this point in the history
  • Loading branch information
icmccorm committed Dec 5, 2023
1 parent 4b873ae commit 53fa9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ pub fn z85_decode(data: &str) -> result::Result<Vec<u8>, DecodeError> {
let c_str = ffi::CString::new(data)?;

unsafe {
zmq_sys::zmq_z85_decode(dest.as_mut_ptr(), c_str.into_raw());
zmq_sys::zmq_z85_decode(dest.as_mut_ptr(), c_str.as_ptr());
}

Ok(dest)
Expand Down

0 comments on commit 53fa9ba

Please sign in to comment.