diff options
author | 2014-07-12 16:03:36 +0000 | |
---|---|---|
committer | 2014-07-12 16:03:36 +0000 | |
commit | 6d04a7b1e8407e9617237f4260725ef336c500fb (patch) | |
tree | bbc0f98986ce22a51cebd8697a6f8887f19e0d6f /lib/libssl/src/crypto/dsa/dsa_gen.c | |
parent | Add an initial regress test for libressl, which calls ressl from Go and (diff) | |
download | wireguard-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_gen.c')
-rw-r--r-- | lib/libssl/src/crypto/dsa/dsa_gen.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/libssl/src/crypto/dsa/dsa_gen.c b/lib/libssl/src/crypto/dsa/dsa_gen.c index d41e7562e10..a3d07b901a6 100644 --- a/lib/libssl/src/crypto/dsa/dsa_gen.c +++ b/lib/libssl/src/crypto/dsa/dsa_gen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_gen.c,v 1.15 2014/07/11 08:44:48 jsing Exp $ */ +/* $OpenBSD: dsa_gen.c,v 1.16 2014/07/12 16:03:37 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -322,12 +322,9 @@ end: ok = 1; err: if (ok) { - if (ret->p) - BN_free(ret->p); - if (ret->q) - BN_free(ret->q); - if (ret->g) - BN_free(ret->g); + BN_free(ret->p); + BN_free(ret->q); + BN_free(ret->g); ret->p = BN_dup(p); ret->q = BN_dup(q); ret->g = BN_dup(g); @@ -346,8 +343,7 @@ err: BN_CTX_end(ctx); BN_CTX_free(ctx); } - if (mont != NULL) - BN_MONT_CTX_free(mont); + BN_MONT_CTX_free(mont); return ok; } #endif |