summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-02-15 10:45:40 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-02-15 10:45:40 -0800
commit9eb9a5b85c359e1ee8aa8016eecb516039bf4069 (patch)
tree573d20054cfc31aff33c3d58a2c499b25b16449e /src
parentdd354096cc718f38b157109489612bebceaac71c (diff)
downloadssh2-rs-9eb9a5b85c359e1ee8aa8016eecb516039bf4069.zip
Also ignore return value in `Channel::drop`
The memory will be leaked if the channel isn't ready to be deallocated, but there's not much we can do about it unfortunately.
Diffstat (limited to 'src')
-rw-r--r--src/channel.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/channel.rs b/src/channel.rs
index cb4cf0f..d7d9b20 100644
--- a/src/channel.rs
+++ b/src/channel.rs
@@ -370,7 +370,9 @@ impl<'sess> Read for Channel<'sess> {
impl<'sess> Drop for Channel<'sess> {
fn drop(&mut self) {
- unsafe { assert_eq!(raw::libssh2_channel_free(self.raw), 0) }
+ unsafe {
+ let _ = raw::libssh2_channel_free(self.raw);
+ }
}
}