We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cargo check
1 parent fc9ee6a commit 19b05d8Copy full SHA for 19b05d8
regex-capi/src/rure.rs
@@ -257,8 +257,8 @@ ffi_fn! {
257
fn rure_iter_capture_names_free(it: *mut IterCaptureNames) {
258
unsafe {
259
let it = &mut *it;
260
- while let Some(ptr) = it.name_ptrs.pop(){
261
- CString::from_raw(ptr);
+ while let Some(ptr) = it.name_ptrs.pop() {
+ drop(CString::from_raw(ptr));
262
}
263
Box::from_raw(it);
264
@@ -624,6 +624,6 @@ fn rure_escape(
624
625
ffi_fn! {
626
fn rure_cstring_free(s: *mut c_char) {
627
- unsafe { CString::from_raw(s); }
+ unsafe { drop(CString::from_raw(s)); }
628
629
0 commit comments