From nobody Thu Apr 21 16:16:26 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B6AFC11D220E; Thu, 21 Apr 2022 16:16:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KkjMt4mm7z3kdt; Thu, 21 Apr 2022 16:16:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650557786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bxb3Po0MIjnnSxwdV6Daj0VEylAkL0y33NJmeRBs8ms=; b=WttdCm532FO56DVWhdJ6Odofddv92BIcBEDp1MjKSg6gYs0MlmkkTuOycjJ9rD51xW1VWf DTfyeiAAqHL8ugC+/yLLZSvWonenTehZznvBXDmEINAsRcZRHm3MVjLorXhAaAICN64fi/ ctDAmzPpOycCHd2hJuGUYYfCqQHgxVZ5WxEVBae2jW72NPxQ1rR4NhAamp/D5jGYOIzx8T HPzd6ABeEe6XLF9zPqyfOD44owsctn6CoFmfWADyKox5JpTORSnWmUcagholBe58fh2EJt KPaHq0B7C7Ylgay7XOV+gTiNpgyY6+tv545T/v0zoWxLyLBKvrRS8tG8YukIjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 838BF3BC5; Thu, 21 Apr 2022 16:16:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23LGGQ09004023; Thu, 21 Apr 2022 16:16:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23LGGQ5J004022; Thu, 21 Apr 2022 16:16:26 GMT (envelope-from git) Date: Thu, 21 Apr 2022 16:16:26 GMT Message-Id: <202204211616.23LGGQ5J004022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ed6287c14168 - main - pf: remove pointless NULL check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed6287c14168de409c5f333bda59896c8109eb70 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650557786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bxb3Po0MIjnnSxwdV6Daj0VEylAkL0y33NJmeRBs8ms=; b=RkQQFIvUk6vqewWEtHSnIuRl6v00XCePbSLt5E0MywJnUvMEQvcYh9SCIGQufNx5Kbo761 4UrYW1BtOSTjjaofry2HN9z6TJxsMMryxCwR2onKK9q2tlM6X7P5JZHXEidhpvcZ0GZ/DV 1ffyCUhvv5D8pCEQU0QFsim8JbhCKLHZQE1gV3+i9dFY9UEstMMW9Fz+8Lq1lGbG0GiJiF mnjP64jaiFku5UCOizgP8sP/XtP0+mkTWSuyz51COm56nTCP3VJt3/pJKoJtbIPz+TMxNr 7htVylJ8WXp1m9dnwmdEgY58Tk2hKx17hKprFPyScI51yDKzTH8czw1MUH+BvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650557786; a=rsa-sha256; cv=none; b=yrRQ/VzJaDV0IZzUjm5gsn81YZmmtzA1UWd6XdZl+0U+h3CTLcNMKPCEqJI+WFtUUpnQAB NhnrqYC4aPwHQue3CM7UHBdYIWB9FnjyVWpEu+D3+thAmTUDeDa+aWiwcapp1da9ZQJ5QH pLTcCVpYkjhBgGNHbu9uzBHmb1u9+ax+wX31QscR8kwlkLq3gqlYIP6nTCbanIussBFZnn mtakvX/JHRmW+B7+y3nHgAEXSKFu0tjbraJBy4AfyVnT04cHUnod6BAeWiw6WyEg+kx0U6 frJLZW9KxceZ413/zJuhECFrZZbmMYMjP2KvNEHv6nFIeR7EvY757KRI/5CnoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ed6287c14168de409c5f333bda59896c8109eb70 commit ed6287c14168de409c5f333bda59896c8109eb70 Author: Kristof Provost AuthorDate: 2022-04-21 12:33:48 +0000 Commit: Kristof Provost CommitDate: 2022-04-21 15:59:45 +0000 pf: remove pointless NULL check pfi_kkif_attach() always returns non-NULL, and we dereference the pointer before we check it, so that's pointless. Reported by: Coverity (CID 1007345) MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_if.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c index dcbbce08ed6c..cdde753c41b3 100644 --- a/sys/netpfil/pf/pf_if.c +++ b/sys/netpfil/pf/pf_if.c @@ -563,8 +563,7 @@ _bad: pfr_detach_table(dyn->pfid_kt); if (ruleset != NULL) pf_remove_if_empty_kruleset(ruleset); - if (dyn->pfid_kif != NULL) - pfi_kkif_unref(dyn->pfid_kif); + pfi_kkif_unref(dyn->pfid_kif); free(dyn, PFI_MTYPE); return (rv);