Rollup merge of - 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:
Mazdak Farrokhzad 2019-01-22 12:20:29 +01:00 committed by GitHub
commit 7fb44e8604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
}
}