From: Roy Marples Date: Mon, 17 Feb 2025 14:18:11 +0000 (+0000) Subject: dhcpcd: Don't leak an interface on link overflow X-Git-Tag: v10.2.1~11 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b1a52d8d91f4d99f9224e979b3008b0ff1bd0e14;p=thirdparty%2Fdhcpcd.git dhcpcd: Don't leak an interface on link overflow --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 2503c39e..09c3da24 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1156,10 +1156,8 @@ dhcpcd_checkcarrier(void *arg) struct interface *ifp0 = arg, *ifp; ifp = if_find(ifp0->ctx->ifaces, ifp0->name); - if (ifp == NULL || ifp->carrier == ifp0->carrier) - return; - - dhcpcd_handlecarrier(ifp, ifp0->carrier, ifp0->flags); + if (ifp != NULL) + dhcpcd_handlecarrier(ifp, ifp0->carrier, ifp0->flags); if_free(ifp0); }