Commit c26bdb3e authored by Matthew Maurer's avatar Matthew Maurer
Browse files

Fix new compiler lints (explicit drop for Boxes)

parent 46e93148
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ unsafe extern "C" fn destroy<S>(bio: *mut BIO) -> c_int {

    let data = BIO_get_data(bio);
    assert!(!data.is_null());
    Box::<StreamState<S>>::from_raw(data as *mut _);
    drop(Box::<StreamState<S>>::from_raw(data as *mut _));
    BIO_set_data(bio, ptr::null_mut());
    BIO_set_init(bio, 0);
    1
@@ -257,7 +257,7 @@ cfg_if! {
        impl Drop for BIO_METHOD {
            fn drop(&mut self) {
                unsafe {
                    Box::<ffi::BIO_METHOD>::from_raw(self.0);
                    drop(Box::<ffi::BIO_METHOD>::from_raw(self.0));
                }
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -558,7 +558,7 @@ unsafe extern "C" fn free_data_box<T>(
    _argp: *mut c_void,
) {
    if !ptr.is_null() {
        Box::<T>::from_raw(ptr as *mut T);
        drop(Box::<T>::from_raw(ptr as *mut T));
    }
}