File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 5
5
* Folding the signal-hook-sys inline (but still compiling C code only
6
6
conditionally).
7
7
* ` WithRawSiginfo ` extractor (to get hands on the raw ` siginfo_t ` ).
8
+ * Bugfix: Don't leak on WithOrigin destruction.
8
9
9
10
# 0.3.1
10
11
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ maintenance = { status = "actively-developed" }
20
20
channel = []
21
21
default = [" channel" , " iterator" ]
22
22
iterator = []
23
+ # TODO: Unify them on the next breaking release.
23
24
extended-siginfo = [" channel" , " iterator" , " extended-siginfo-raw" ]
24
25
extended-siginfo-raw = [" cc" ]
25
26
Original file line number Diff line number Diff line change @@ -20,6 +20,15 @@ use crate::low_level::channel::Channel;
20
20
#[ derive( Default , Debug ) ]
21
21
pub struct Slot ( AtomicPtr < Channel < siginfo_t > > ) ;
22
22
23
+ impl Drop for Slot {
24
+ fn drop ( & mut self ) {
25
+ let ptr = self . 0 . load ( Ordering :: Acquire ) ;
26
+ if !ptr. is_null ( ) {
27
+ drop ( unsafe { Box :: from_raw ( ptr) } ) ;
28
+ }
29
+ }
30
+ }
31
+
23
32
/// The [`Exfiltrator`][crate::iterator::exfiltrator::Exfiltrator] that produces the raw
24
33
/// [`libc::siginfo_t`]. Note that it might look differently on different OSes and its API is a
25
34
/// little bit more limited than its C counterpart.
You can’t perform that action at this time.
0 commit comments