diff options
| author | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2019-01-16 23:05:50 +0900 |
|---|---|---|
| committer | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2019-01-16 23:08:30 +0900 |
| commit | 763392cb8ca09e0f332c1ab9b75376afbdafc18f (patch) | |
| tree | 228d3c365e0e50ce9ff4c7be87f3a495dce30fb2 /src/libsyntax | |
| parent | af2c159cc38f251a8e7d43cf1f98806392fbddcf (diff) | |
| download | rust-763392cb8ca09e0f332c1ab9b75376afbdafc18f.tar.gz rust-763392cb8ca09e0f332c1ab9b75376afbdafc18f.zip | |
Fix memory leak in P::filter_map
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ptr.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/ptr.rs b/src/libsyntax/ptr.rs index bb1744e2df1..3effe53cd29 100644 --- a/src/libsyntax/ptr.rs +++ b/src/libsyntax/ptr.rs @@ -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 } } |
