diff options
| author | Chris Cole <[email protected]> | 2014-09-27 23:34:10 -0400 |
|---|---|---|
| committer | Chris Cole <[email protected]> | 2014-09-27 23:34:10 -0400 |
| commit | 6bc8e1c560a65f07f00b59039e06f733ec33c2af (patch) | |
| tree | 22699ced9deaedf150b0b1c2b6142d00a75d0d67 /src | |
| parent | Added signatures forBN_sub_word, BN_is_zero, BN_is_one, BN_is_word, (diff) | |
| download | rust-openssl-6bc8e1c560a65f07f00b59039e06f733ec33c2af.tar.xz rust-openssl-6bc8e1c560a65f07f00b59039e06f733ec33c2af.zip | |
Use CRYPTO_free to free the result of BN_bn2bin.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bn/mod.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/bn/mod.rs b/src/bn/mod.rs index 7fa6c528..3a6f18fd 100644 --- a/src/bn/mod.rs +++ b/src/bn/mod.rs @@ -83,9 +83,7 @@ extern { /* Conversion from/to string representation */ fn BN_bn2dec(a: *mut BIGNUM) -> *const c_char; -/* - fn OpenSSL_free(buf: *const c_char); -*/ + fn CRYPTO_free(buf: *const c_char); } pub struct BigNum(*mut BIGNUM); @@ -441,9 +439,7 @@ impl BigNum { assert!(!buf.is_null()); let c_str = CString::new(buf, false); let str = c_str.as_str().unwrap().to_string(); -/* XXX - OpenSSL_free(buf); -*/ + CRYPTO_free(buf); str } } |