diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
commit | b548a1f11c06ccdfa4f52a539912d22d77ee309e (patch) | |
tree | 37ff8792ddf09e4805aa3ba76b805923d3c52734 /test/ecdhtest.c | |
parent | 33fbca83dcd05b77f807fab205c4523b8cfe85b5 (diff) |
free null cleanup finale
Don't check for NULL before calling OPENSSL_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/ecdhtest.c')
-rw-r--r-- | test/ecdhtest.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/ecdhtest.c b/test/ecdhtest.c index af124764c8..47c8185b77 100644 --- a/test/ecdhtest.c +++ b/test/ecdhtest.c @@ -278,10 +278,8 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) err: ERR_print_errors_fp(stderr); - if (abuf != NULL) - OPENSSL_free(abuf); - if (bbuf != NULL) - OPENSSL_free(bbuf); + OPENSSL_free(abuf); + OPENSSL_free(bbuf); BN_free(x_a); BN_free(y_a); BN_free(x_b); @@ -433,8 +431,7 @@ static int ecdh_kat(BIO *out, const char *cname, int nid, err: EC_KEY_free(key1); EC_KEY_free(key2); - if (Ztmp) - OPENSSL_free(Ztmp); + OPENSSL_free(Ztmp); if (rv) BIO_puts(out, " ok\n"); else { |