Skip to content

Commit

Permalink
Fix memory leak in P::filter_map
Browse files Browse the repository at this point in the history
  • Loading branch information
ishitatsuyuki committed Jan 16, 2019
1 parent af2c159 commit 763392c
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 763392c

Please sign in to comment.