diff options
Diffstat (limited to 'src/lib/libcrypto/cms/cms_asn1.c')
-rw-r--r-- | src/lib/libcrypto/cms/cms_asn1.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/cms/cms_asn1.c b/src/lib/libcrypto/cms/cms_asn1.c index a75fa26137..fbdac5b1ba 100644 --- a/src/lib/libcrypto/cms/cms_asn1.c +++ b/src/lib/libcrypto/cms/cms_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cms_asn1.c,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ | 1 | /* $OpenBSD: cms_asn1.c,v 1.5 2014/07/12 16:03:37 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. | 3 | * project. |
4 | */ | 4 | */ |
@@ -91,8 +91,7 @@ cms_si_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) | |||
91 | { | 91 | { |
92 | if (operation == ASN1_OP_FREE_POST) { | 92 | if (operation == ASN1_OP_FREE_POST) { |
93 | CMS_SignerInfo *si = (CMS_SignerInfo *)*pval; | 93 | CMS_SignerInfo *si = (CMS_SignerInfo *)*pval; |
94 | if (si->pkey) | 94 | EVP_PKEY_free(si->pkey); |
95 | EVP_PKEY_free(si->pkey); | ||
96 | if (si->signer) | 95 | if (si->signer) |
97 | X509_free(si->signer); | 96 | X509_free(si->signer); |
98 | } | 97 | } |
@@ -219,8 +218,7 @@ cms_ri_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) | |||
219 | CMS_RecipientInfo *ri = (CMS_RecipientInfo *)*pval; | 218 | CMS_RecipientInfo *ri = (CMS_RecipientInfo *)*pval; |
220 | if (ri->type == CMS_RECIPINFO_TRANS) { | 219 | if (ri->type == CMS_RECIPINFO_TRANS) { |
221 | CMS_KeyTransRecipientInfo *ktri = ri->d.ktri; | 220 | CMS_KeyTransRecipientInfo *ktri = ri->d.ktri; |
222 | if (ktri->pkey) | 221 | EVP_PKEY_free(ktri->pkey); |
223 | EVP_PKEY_free(ktri->pkey); | ||
224 | if (ktri->recip) | 222 | if (ktri->recip) |
225 | X509_free(ktri->recip); | 223 | X509_free(ktri->recip); |
226 | } else if (ri->type == CMS_RECIPINFO_KEK) { | 224 | } else if (ri->type == CMS_RECIPINFO_KEK) { |