Skip to content

Commit 4b81cb8

Browse files
committed
Fix new compiler lints (explicit drop for Boxes)
1 parent ae67959 commit 4b81cb8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

openssl/src/ssl/bio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ unsafe extern "C" fn destroy<S>(bio: *mut BIO) -> c_int {
183183

184184
let data = BIO_get_data(bio);
185185
assert!(!data.is_null());
186-
Box::<StreamState<S>>::from_raw(data as *mut _);
186+
drop(Box::<StreamState<S>>::from_raw(data as *mut _));
187187
BIO_set_data(bio, ptr::null_mut());
188188
BIO_set_init(bio, 0);
189189
1

openssl/src/ssl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ unsafe extern "C" fn free_data_box<T>(
558558
_argp: *mut c_void,
559559
) {
560560
if !ptr.is_null() {
561-
Box::<T>::from_raw(ptr as *mut T);
561+
drop(Box::<T>::from_raw(ptr as *mut T));
562562
}
563563
}
564564

0 commit comments

Comments
 (0)