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 | 34f9788af7df52d9f1aa22f020b023c40a010d68 (patch) | |
tree | 121b6706dd19d39f0c52ff477d57671074c44372 | |
parent | 270080b717431d930a53e1184c5cd208c965a06a (diff) |
Memory leak in `should not happen' condition; Coverity CID 78889.
ok doug@ jsing@
-rw-r--r-- | lib/libcrypto/x509v3/v3_crld.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcrypto/x509v3/v3_crld.c b/lib/libcrypto/x509v3/v3_crld.c index 207e0944aab..b2e43706581 100644 --- a/lib/libcrypto/x509v3/v3_crld.c +++ b/lib/libcrypto/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; |