From 313ac8f1b3f6c53ee53e5172e41f356e409eb4be Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 4 Jan 2022 20:04:38 +0000 Subject: [PATCH] Remove some dead code IPAddressRange_new() populates both its min and max members, so they won't ever be NULL and will never need to be allocated. ok inoguchi jsing --- lib/libcrypto/x509/x509_addr.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/libcrypto/x509/x509_addr.c b/lib/libcrypto/x509/x509_addr.c index 684a115401c..a3d5ec74ece 100644 --- a/lib/libcrypto/x509/x509_addr.c +++ b/lib/libcrypto/x509/x509_addr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_addr.c,v 1.50 2022/01/04 20:02:22 tb Exp $ */ +/* $OpenBSD: x509_addr.c,v 1.51 2022/01/04 20:04:38 tb Exp $ */ /* * Contributed to the OpenSSL Project by the American Registry for * Internet Numbers ("ARIN"). @@ -849,12 +849,6 @@ make_addressRange(IPAddressOrRange **result, unsigned char *min, aor->type = IPAddressOrRange_addressRange; if ((aor->u.addressRange = IPAddressRange_new()) == NULL) goto err; - if (aor->u.addressRange->min == NULL && - (aor->u.addressRange->min = ASN1_BIT_STRING_new()) == NULL) - goto err; - if (aor->u.addressRange->max == NULL && - (aor->u.addressRange->max = ASN1_BIT_STRING_new()) == NULL) - goto err; for (i = length; i > 0 && min[i - 1] == 0x00; --i) continue; -- 2.20.1