From 53fa9ba87c1ba479b4197f49e48242bd9f50b774 Mon Sep 17 00:00:00 2001 From: Ian McCormack Date: Tue, 5 Dec 2023 17:22:32 -0500 Subject: [PATCH] Fixed memory leak in z85_decode. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 17dc0ccd..c55722d6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1343,7 +1343,7 @@ pub fn z85_decode(data: &str) -> result::Result, 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)