From f60461cbf72bd525ba04e9628c9b7867ade02c8f Mon Sep 17 00:00:00 2001
From: 4lDO2 <4lDO2@protonmail.com>
Date: Tue, 2 May 2023 11:39:12 +0200
Subject: [PATCH] Use drop_in_place for pthread_attr_destroy.

---
 src/header/pthread/attr.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/header/pthread/attr.rs b/src/header/pthread/attr.rs
index b9f727945..481a7c170 100644
--- a/src/header/pthread/attr.rs
+++ b/src/header/pthread/attr.rs
@@ -29,9 +29,7 @@ impl Default for RlctAttr {
 
 #[no_mangle]
 pub unsafe extern "C" fn pthread_attr_destroy(attr: *mut pthread_attr_t) -> c_int {
-    let _attr = &mut *attr.cast::<RlctAttr>();
-
-    // No-op
+    core::ptr::drop_in_place(attr);
     0
 }
 
-- 
GitLab