Use CRYPTO_free to free the result of BN_bn2bin.
This commit is contained in:
parent
7235e03c95
commit
6bc8e1c560
|
|
@ -83,9 +83,7 @@ extern {
|
||||||
|
|
||||||
/* Conversion from/to string representation */
|
/* Conversion from/to string representation */
|
||||||
fn BN_bn2dec(a: *mut BIGNUM) -> *const c_char;
|
fn BN_bn2dec(a: *mut BIGNUM) -> *const c_char;
|
||||||
/*
|
fn CRYPTO_free(buf: *const c_char);
|
||||||
fn OpenSSL_free(buf: *const c_char);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct BigNum(*mut BIGNUM);
|
pub struct BigNum(*mut BIGNUM);
|
||||||
|
|
@ -441,9 +439,7 @@ impl BigNum {
|
||||||
assert!(!buf.is_null());
|
assert!(!buf.is_null());
|
||||||
let c_str = CString::new(buf, false);
|
let c_str = CString::new(buf, false);
|
||||||
let str = c_str.as_str().unwrap().to_string();
|
let str = c_str.as_str().unwrap().to_string();
|
||||||
/* XXX
|
CRYPTO_free(buf);
|
||||||
OpenSSL_free(buf);
|
|
||||||
*/
|
|
||||||
str
|
str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue