diff options
| author | jsing <> | 2015-02-19 05:12:01 +0000 |
|---|---|---|
| committer | jsing <> | 2015-02-19 05:12:01 +0000 |
| commit | 8ad720213befab5b57cf61e74b30f2150bee6153 (patch) | |
| tree | eb3906ac07adc8a710bc68f5a80e1a00987bbcb1 | |
| parent | 95d5407a5238dd1d725ff4fbbf7466a9c79dd555 (diff) | |
| download | openbsd-8ad720213befab5b57cf61e74b30f2150bee6153.tar.gz openbsd-8ad720213befab5b57cf61e74b30f2150bee6153.tar.bz2 openbsd-8ad720213befab5b57cf61e74b30f2150bee6153.zip | |
BN_free() has its own NULL check.
| -rw-r--r-- | src/regress/lib/libcrypto/bn/general/bntest.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/regress/lib/libcrypto/bn/general/bntest.c b/src/regress/lib/libcrypto/bn/general/bntest.c index 6882702e93..9debc00042 100644 --- a/src/regress/lib/libcrypto/bn/general/bntest.c +++ b/src/regress/lib/libcrypto/bn/general/bntest.c | |||
| @@ -1709,14 +1709,10 @@ test_kron(BIO *bp, BN_CTX *ctx) | |||
| 1709 | fflush(stderr); | 1709 | fflush(stderr); |
| 1710 | ret = 1; | 1710 | ret = 1; |
| 1711 | err: | 1711 | err: |
| 1712 | if (a != NULL) | 1712 | BN_free(a); |
| 1713 | BN_free(a); | 1713 | BN_free(b); |
| 1714 | if (b != NULL) | 1714 | BN_free(r); |
| 1715 | BN_free(b); | 1715 | BN_free(t); |
| 1716 | if (r != NULL) | ||
| 1717 | BN_free(r); | ||
| 1718 | if (t != NULL) | ||
| 1719 | BN_free(t); | ||
| 1720 | return ret; | 1716 | return ret; |
| 1721 | } | 1717 | } |
| 1722 | 1718 | ||
| @@ -1803,12 +1799,9 @@ test_sqrt(BIO *bp, BN_CTX *ctx) | |||
| 1803 | } | 1799 | } |
| 1804 | ret = 1; | 1800 | ret = 1; |
| 1805 | err: | 1801 | err: |
| 1806 | if (a != NULL) | 1802 | BN_free(a); |
| 1807 | BN_free(a); | 1803 | BN_free(p); |
| 1808 | if (p != NULL) | 1804 | BN_free(r); |
| 1809 | BN_free(p); | ||
| 1810 | if (r != NULL) | ||
| 1811 | BN_free(r); | ||
| 1812 | return ret; | 1805 | return ret; |
| 1813 | } | 1806 | } |
| 1814 | 1807 | ||
