aboutsummaryrefslogtreecommitdiff
path: root/src/macros.rs
diff options
context:
space:
mode:
authorValerii Hiora <[email protected]>2014-10-01 20:19:29 +0300
committerValerii Hiora <[email protected]>2014-10-06 07:12:54 +0300
commit72ee42adba18adbb0e6eefd13faab5e6d610fdcd (patch)
tree2ce3241b11f7a6f53fa9127e8a1e8085a4d1f6e8 /src/macros.rs
parentIgnore stderr from openssl s_server (diff)
downloadrust-openssl-72ee42adba18adbb0e6eefd13faab5e6d610fdcd.tar.xz
rust-openssl-72ee42adba18adbb0e6eefd13faab5e6d610fdcd.zip
Better error handling in cert generation
Now it should correctly free all resources in case of failure.
Diffstat (limited to 'src/macros.rs')
-rw-r--r--src/macros.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/macros.rs b/src/macros.rs
index 061381f2..2de14620 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -26,7 +26,11 @@ macro_rules! try_ssl{
/// Shortcut return with SSL if got a null result
macro_rules! try_ssl_null{
- ($e:expr) => (try_ssl_if!($e == ptr::null_mut()))
+ ($e:expr) => ({
+ let t = $e;
+ try_ssl_if!(t == ptr::null_mut());
+ t
+ })
}