Skip to content

Commit

Permalink
Rollup merge of rust-lang#57667 - ishitatsuyuki:p-leak, r=nnethercote
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Centril authored Jan 22, 2019
2 parents ad55b73 + 763392c commit 7fb44e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libsyntax/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 7fb44e8

Please sign in to comment.