git: 78782f3dd2f2 - releng/14.1 - fib_dxr: free() does nothing if arg is NULL, so remove a redundant check.

From: Marko Zec <zec_at_FreeBSD.org>
Date: Thu, 23 May 2024 05:37:24 UTC
The branch releng/14.1 has been updated by zec:

URL: https://cgit.FreeBSD.org/src/commit/?id=78782f3dd2f27b5665abcb94a04584bd68900da0

commit 78782f3dd2f27b5665abcb94a04584bd68900da0
Author:     Marko Zec <zec@FreeBSD.org>
AuthorDate: 2024-05-06 18:34:11 +0000
Commit:     Marko Zec <zec@FreeBSD.org>
CommitDate: 2024-05-23 04:26:37 +0000

    fib_dxr: free() does nothing if arg is NULL, so remove a redundant check.
    
    MFC after:      1 week
    Approved by:    re (cperciva)
    
    (cherry picked from commit 64136682ba1681e56093f77b4cec8bdfa6375a72)
---
 sys/netinet/in_fib_dxr.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c
index c4815a64b260..f7840858f9c9 100644
--- a/sys/netinet/in_fib_dxr.c
+++ b/sys/netinet/in_fib_dxr.c
@@ -1142,14 +1142,11 @@ static void
 dxr_destroy(void *data)
 {
 	struct dxr *dxr = data;
-	struct dxr_aux *da;
+	struct dxr_aux *da = dxr->aux;
 	struct chunk_desc *cdp;
 	struct trie_desc *tp;
 
-	if (dxr->d != NULL)
-		free(dxr->d, M_DXRLPM);
-
-	da = dxr->aux;
+	free(dxr->d, M_DXRLPM);
 	free(dxr, M_DXRAUX);
 
 	if (da == NULL || atomic_fetchadd_int(&da->refcnt, -1) > 1)