Shuran Sun
Shuran Sun
https://github.com/spacejam/sled/blob/69294e59c718289ab3cb6bd03ac3b9e1e072a1e7/src/lazy.rs#L88-L92 If the assert fails, the object value_ptr pointing to (which is on the heap) will leak.
https://github.com/spacejam/rio/blob/319f7fb04014aa88540c3539bd97d5a0006a1eb9/src/lazy.rs#L79-L84 If the assert fails, the object value_ptr pointing to (which is on the heap) will leak.
https://github.com/apache/incubator-teaclave-sgx-sdk/blob/3c903bdac4e503dd27b9b1f761c4abfc55f2464c/samplecode/localattestation/attestation/src/func.rs#L144-L145 https://github.com/apache/incubator-teaclave-sgx-sdk/blob/3c903bdac4e503dd27b9b1f761c4abfc55f2464c/samplecode/dcap-pckretrieval/qpl/src/lib.rs#L138-L142 with `Box::into_raw()`, the pointee is on the heap. Multiple assignments will cause leak of the old value. Probable fix is like: If `session_request_safe` should only be called once,...
https://github.com/vorner/signal-hook/blob/7dfed903c065962164699c0c015c36f838135fa6/src/iterator/exfiltrator/raw.rs#L87-L94 Noticed that if init is called multiple times, the code will panic. Probable fix is like: Use [`compare_and_exchange`](https://doc.rust-lang.org/core/sync/atomic/struct.AtomicPtr.html#method.compare_exchange) and only store the value when the `slot.0` is null.
https://github.com/overdrivenpotato/rust-vst2/blob/244e14bd28caff3b21aa27f26a57bf01f01b7780/src/host.rs#L340-L344 with `Box::into_raw(Box::new(self.host.clone()))`, the pointee is on the heap. Multiple assignments will cause the old value to leak. Probable fix is like: If `call_main` should only be called once, adding...
https://github.com/getsentry/symsynd/blob/13825f10bfb9291fe7bcd13937ddf398e7104234/libdebug/src/cabi.rs#L19-L24 https://github.com/getsentry/symsynd/blob/13825f10bfb9291fe7bcd13937ddf398e7104234/libdebug/src/cabi.rs#L72-L79 The destructor won't release CError.message (on the heap since `(*err_out).message = Box::into_raw(s.into_boxed_str()) as *mut u8; `), causing memory leak. To free the field, probable fix is like: https://github.com/getsentry/symsynd/blob/13825f10bfb9291fe7bcd13937ddf398e7104234/libdebug/src/cabi.rs#L128-L133...