From 8bffdd75aea2d71e0f4f8fd7952908653523e33a Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 14 Feb 2015 15:19:05 +0000 Subject: Memory leak in `should not happen' condition; Coverity CID 78889. ok doug@ jsing@ --- lib/libssl/src/crypto/x509v3/v3_crld.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/libssl') 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; -- cgit v1.2.3