summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/crypto/dsa/dsa_lib.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-07-12 16:03:36 +0000
committermiod <miod@openbsd.org>2014-07-12 16:03:36 +0000
commit6d04a7b1e8407e9617237f4260725ef336c500fb (patch)
treebbc0f98986ce22a51cebd8697a6f8887f19e0d6f /lib/libssl/src/crypto/dsa/dsa_lib.c
parentAdd an initial regress test for libressl, which calls ressl from Go and (diff)
downloadwireguard-openbsd-6d04a7b1e8407e9617237f4260725ef336c500fb.tar.xz
wireguard-openbsd-6d04a7b1e8407e9617237f4260725ef336c500fb.zip
if (x) FOO_free(x) -> FOO_free(x).
Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
Diffstat (limited to 'lib/libssl/src/crypto/dsa/dsa_lib.c')
-rw-r--r--lib/libssl/src/crypto/dsa/dsa_lib.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/lib/libssl/src/crypto/dsa/dsa_lib.c b/lib/libssl/src/crypto/dsa/dsa_lib.c
index 97307134cd5..1cfd6ce6b83 100644
--- a/lib/libssl/src/crypto/dsa/dsa_lib.c
+++ b/lib/libssl/src/crypto/dsa/dsa_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsa_lib.c,v 1.20 2014/07/11 08:44:48 jsing Exp $ */
+/* $OpenBSD: dsa_lib.c,v 1.21 2014/07/12 16:03:37 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -201,20 +201,13 @@ DSA_free(DSA *r)
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, r, &r->ex_data);
- if (r->p != NULL)
- BN_clear_free(r->p);
- if (r->q != NULL)
- BN_clear_free(r->q);
- if (r->g != NULL)
- BN_clear_free(r->g);
- if (r->pub_key != NULL)
- BN_clear_free(r->pub_key);
- if (r->priv_key != NULL)
- BN_clear_free(r->priv_key);
- if (r->kinv != NULL)
- BN_clear_free(r->kinv);
- if (r->r != NULL)
- BN_clear_free(r->r);
+ BN_clear_free(r->p);
+ BN_clear_free(r->q);
+ BN_clear_free(r->g);
+ BN_clear_free(r->pub_key);
+ BN_clear_free(r->priv_key);
+ BN_clear_free(r->kinv);
+ BN_clear_free(r->r);
free(r);
}
@@ -305,8 +298,7 @@ DSA_dup_DH(const DSA *r)
return ret;
err:
- if (ret != NULL)
- DH_free(ret);
+ DH_free(ret);
return NULL;
}
#endif