diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa_ameth.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c index 7da4ac5695..20839b6207 100644 --- a/src/lib/libcrypto/dsa/dsa_ameth.c +++ b/src/lib/libcrypto/dsa/dsa_ameth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dsa_ameth.c,v 1.13 2014/07/12 16:03:37 miod Exp $ */ | 1 | /* $OpenBSD: dsa_ameth.c,v 1.14 2014/07/13 12:45:01 miod 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 | */ |
| @@ -275,9 +275,10 @@ decerr: | |||
| 275 | DSAerr(DSA_F_DSA_PRIV_DECODE, EVP_R_DECODE_ERROR); | 275 | DSAerr(DSA_F_DSA_PRIV_DECODE, EVP_R_DECODE_ERROR); |
| 276 | dsaerr: | 276 | dsaerr: |
| 277 | BN_CTX_free(ctx); | 277 | BN_CTX_free(ctx); |
| 278 | if (privkey) | 278 | if (ndsa) |
| 279 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); | ||
| 280 | else | ||
| 279 | ASN1_INTEGER_free(privkey); | 281 | ASN1_INTEGER_free(privkey); |
| 280 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); | ||
| 281 | DSA_free(dsa); | 282 | DSA_free(dsa); |
| 282 | return 0; | 283 | return 0; |
| 283 | } | 284 | } |
| @@ -313,6 +314,7 @@ dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) | |||
| 313 | dplen = i2d_ASN1_INTEGER(prkey, &dp); | 314 | dplen = i2d_ASN1_INTEGER(prkey, &dp); |
| 314 | 315 | ||
| 315 | ASN1_INTEGER_free(prkey); | 316 | ASN1_INTEGER_free(prkey); |
| 317 | prkey = NULL; | ||
| 316 | 318 | ||
| 317 | if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(NID_dsa), 0, V_ASN1_SEQUENCE, | 319 | if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(NID_dsa), 0, V_ASN1_SEQUENCE, |
| 318 | params, dp, dplen)) | 320 | params, dp, dplen)) |
