summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-07-20 15:29:14 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-07-20 15:29:14 +0000
commit29e740df7eb4ee4bb7a0261ad5f645610d29fa89 (patch)
tree66d597932400489077046a84bde4256358dba76f /lib
parentf4deafa8e772a3698cb16a811d59cfdf42050702 (diff)
When freeing an X509_CRL, if freeing the user-maintained meth_data fails,
do not forgot to nevertheless keep freeing the other fields. ok doug@ guenther@
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/crypto/asn1/x_crl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libssl/src/crypto/asn1/x_crl.c b/lib/libssl/src/crypto/asn1/x_crl.c
index 7b76d2ec47e..6062587ed46 100644
--- a/lib/libssl/src/crypto/asn1/x_crl.c
+++ b/lib/libssl/src/crypto/asn1/x_crl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_crl.c,v 1.24 2015/02/11 04:00:39 jsing Exp $ */
+/* $OpenBSD: x_crl.c,v 1.25 2015/07/20 15:29:13 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -270,6 +270,7 @@ crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg)
STACK_OF(X509_EXTENSION) *exts;
X509_EXTENSION *ext;
int idx;
+ int rc = 1;
switch (operation) {
case ASN1_OP_NEW_POST:
@@ -345,7 +346,7 @@ crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg)
case ASN1_OP_FREE_POST:
if (crl->meth->crl_free) {
if (!crl->meth->crl_free(crl))
- return 0;
+ rc = 0;
}
if (crl->akid)
AUTHORITY_KEYID_free(crl->akid);
@@ -356,7 +357,7 @@ crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg)
sk_GENERAL_NAMES_pop_free(crl->issuers, GENERAL_NAMES_free);
break;
}
- return 1;
+ return rc;
}
/* Convert IDP into a more convenient form */