Rollup merge of #57667 - ishitatsuyuki:p-leak, r=nnethercote
Fix memory leak in P::filter_map Probably this function isn't widely used, but anyway this wasn't working as intended. r? @eddyb Do not rollup if you want to see if max-rss change in perf.
This commit is contained in:
commit
7fb44e8604
1 changed files with 1 additions and 0 deletions
|
@ -101,6 +101,7 @@ impl<T: 'static> P<T> {
|
|||
// Recreate self from the raw pointer.
|
||||
Some(P { ptr: Box::from_raw(p) })
|
||||
} else {
|
||||
drop(Box::from_raw(p));
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue