diff options
Diffstat (limited to 'src/lib/libcrypto/dh/dh_ameth.c')
| -rw-r--r-- | src/lib/libcrypto/dh/dh_ameth.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/libcrypto/dh/dh_ameth.c b/src/lib/libcrypto/dh/dh_ameth.c index 9e911c8779..21714bb748 100644 --- a/src/lib/libcrypto/dh/dh_ameth.c +++ b/src/lib/libcrypto/dh/dh_ameth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dh_ameth.c,v 1.9 2014/07/09 13:26:47 miod Exp $ */ | 1 | /* $OpenBSD: dh_ameth.c,v 1.10 2014/07/09 22:55:17 tedu Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -167,8 +167,7 @@ dh_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) | |||
| 167 | 167 | ||
| 168 | err: | 168 | err: |
| 169 | free(penc); | 169 | free(penc); |
| 170 | if (str) | 170 | ASN1_STRING_free(str); |
| 171 | ASN1_STRING_free(str); | ||
| 172 | 171 | ||
| 173 | return 0; | 172 | return 0; |
| 174 | } | 173 | } |
| @@ -271,10 +270,8 @@ dh_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) | |||
| 271 | 270 | ||
| 272 | err: | 271 | err: |
| 273 | free(dp); | 272 | free(dp); |
| 274 | if (params != NULL) | 273 | ASN1_STRING_free(params); |
| 275 | ASN1_STRING_free(params); | 274 | ASN1_INTEGER_free(prkey); |
| 276 | if (prkey != NULL) | ||
| 277 | ASN1_INTEGER_free(prkey); | ||
| 278 | return 0; | 275 | return 0; |
| 279 | } | 276 | } |
| 280 | 277 | ||
