diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-02-14 15:19:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-02-14 15:19:05 +0000 |
commit | 8bffdd75aea2d71e0f4f8fd7952908653523e33a (patch) | |
tree | 9c82fe0a0281110093da088f4fccf3321aa1a4bf /lib/libssl | |
parent | 1fc89b0c422a3162ccc97faf972ec10a6a1427bd (diff) |
Memory leak in `should not happen' condition; Coverity CID 78889.
ok doug@ jsing@
Diffstat (limited to 'lib/libssl')
-rw-r--r-- | lib/libssl/src/crypto/x509v3/v3_crld.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libssl/src/crypto/x509v3/v3_crld.c b/lib/libssl/src/crypto/x509v3/v3_crld.c index 207e0944aab..b2e43706581 100644 --- a/lib/libssl/src/crypto/x509v3/v3_crld.c +++ b/lib/libssl/src/crypto/x509v3/v3_crld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: v3_crld.c,v 1.15 2015/02/10 08:33:10 jsing Exp $ */ +/* $OpenBSD: v3_crld.c,v 1.16 2015/02/14 15:19:04 miod Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -204,10 +204,10 @@ set_reasons(ASN1_BIT_STRING **preas, char *value) const char *bnam; int i, ret = 0; - rsk = X509V3_parse_list(value); - if (!rsk) + if (*preas != NULL) return 0; - if (*preas) + rsk = X509V3_parse_list(value); + if (rsk == NULL) return 0; for (i = 0; i < sk_CONF_VALUE_num(rsk); i++) { bnam = sk_CONF_VALUE_value(rsk, i)->name; |