diff options
| author | Erick Tryzelaar <[email protected]> | 2013-08-15 07:30:37 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <[email protected]> | 2013-08-15 07:55:22 -0700 |
| commit | 5ba7c49a91c27a9bc2c32a6e8a6e6c03ca3b4618 (patch) | |
| tree | 20dc30c6d8c28633d8e7dfd940e65c94d4692cc6 /pkey.rs | |
| parent | Update to rust 0.8-pre (diff) | |
| download | rust-openssl-5ba7c49a91c27a9bc2c32a6e8a6e6c03ca3b4618.tar.xz rust-openssl-5ba7c49a91c27a9bc2c32a6e8a6e6c03ca3b4618.zip | |
Add destructors to all the types that need destructing
Diffstat (limited to 'pkey.rs')
| -rw-r--r-- | pkey.rs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -336,6 +336,14 @@ impl PKey { } } +impl Drop for PKey { + fn drop(&self) { + unsafe { + libcrypto::EVP_PKEY_free(self.evp); + } + } +} + #[cfg(test)] mod tests { use super::*; |