From 75b92fd954a289e0af58a52a0fb48c3752eeac58 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Tue, 2 May 2017 04:11:08 +0000 Subject: the XXXfree functions being called accept NULL, so don't check first. ok beck --- src/lib/libcrypto/x509v3/v3_pci.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/lib/libcrypto/x509v3/v3_pci.c') diff --git a/src/lib/libcrypto/x509v3/v3_pci.c b/src/lib/libcrypto/x509v3/v3_pci.c index dd015452d0..437b3aee3d 100644 --- a/src/lib/libcrypto/x509v3/v3_pci.c +++ b/src/lib/libcrypto/x509v3/v3_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: v3_pci.c,v 1.12 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: v3_pci.c,v 1.13 2017/05/02 04:11:08 deraadt Exp $ */ /* Contributed to the OpenSSL Project 2004 * by Richard Levitte (richard@levitte.org) */ @@ -298,18 +298,12 @@ r2i_pci(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *value) goto end; err: - if (language) { - ASN1_OBJECT_free(language); - language = NULL; - } - if (pathlen) { - ASN1_INTEGER_free(pathlen); - pathlen = NULL; - } - if (policy) { - ASN1_OCTET_STRING_free(policy); - policy = NULL; - } + ASN1_OBJECT_free(language); + language = NULL; + ASN1_INTEGER_free(pathlen); + pathlen = NULL; + ASN1_OCTET_STRING_free(policy); + policy = NULL; end: sk_CONF_VALUE_pop_free(vals, X509V3_conf_free); return pci; -- cgit v1.2.3-55-g6feb