diff options
| author | tedu <> | 2014-05-30 02:52:11 +0000 |
|---|---|---|
| committer | tedu <> | 2014-05-30 02:52:11 +0000 |
| commit | c442171f7692d3610a7aa5a08593cabf7253c5af (patch) | |
| tree | a802460259115af2ecf6be49736b1b6a09173232 /src/lib/libcrypto/asn1/ameth_lib.c | |
| parent | 60f672682a47559e679725da4d8dc8efa1ddceff (diff) | |
| download | openbsd-c442171f7692d3610a7aa5a08593cabf7253c5af.tar.gz openbsd-c442171f7692d3610a7aa5a08593cabf7253c5af.tar.bz2 openbsd-c442171f7692d3610a7aa5a08593cabf7253c5af.zip | |
no need for null check before free. from Brendan MacDonell
Diffstat (limited to 'src/lib/libcrypto/asn1/ameth_lib.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/ameth_lib.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/ameth_lib.c b/src/lib/libcrypto/asn1/ameth_lib.c index 8652e938bd..771b4f9690 100644 --- a/src/lib/libcrypto/asn1/ameth_lib.c +++ b/src/lib/libcrypto/asn1/ameth_lib.c | |||
| @@ -380,10 +380,8 @@ void | |||
| 380 | EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth) | 380 | EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth) |
| 381 | { | 381 | { |
| 382 | if (ameth && (ameth->pkey_flags & ASN1_PKEY_DYNAMIC)) { | 382 | if (ameth && (ameth->pkey_flags & ASN1_PKEY_DYNAMIC)) { |
| 383 | if (ameth->pem_str) | 383 | free(ameth->pem_str); |
| 384 | free(ameth->pem_str); | 384 | free(ameth->info); |
| 385 | if (ameth->info) | ||
| 386 | free(ameth->info); | ||
| 387 | free(ameth); | 385 | free(ameth); |
| 388 | } | 386 | } |
| 389 | } | 387 | } |
