From 02a4417fb4e958701fa1c0acefe2951cbe502821 Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 24 Feb 2021 16:27:05 +0000 Subject: [PATCH] No need to check ifi->active for NULL when looking for duplicate/obsolete leases. It can't be NULL, and is unconditionally dereferenced a few lines later anyway. --- sbin/dhclient/dhclient.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 667167f5e3b..b7f9ff0a17e 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.700 2021/02/24 16:21:33 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.701 2021/02/24 16:27:05 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -1098,8 +1098,6 @@ newlease: */ seen = 0; TAILQ_FOREACH_SAFE(ll, &ifi->lease_db, next, pl) { - if (ifi->active == NULL) - continue; if (ifi->ssid_len != ll->ssid_len) continue; if (memcmp(ifi->ssid, ll->ssid, ll->ssid_len) != 0) -- 2.20.1