diff options
author | Alex Crichton <alex@alexcrichton.com> | 2016-02-15 10:45:40 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2016-02-15 10:45:40 -0800 |
commit | 9eb9a5b85c359e1ee8aa8016eecb516039bf4069 (patch) | |
tree | 573d20054cfc31aff33c3d58a2c499b25b16449e | |
parent | dd354096cc718f38b157109489612bebceaac71c (diff) | |
download | ssh2-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.
-rw-r--r-- | src/channel.rs | 4 |
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); + } } } |