From nobody Tue May 14 20:39:27 2024 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 4Vf7WN2BlPz5L092; Tue, 14 May 2024 20:39:28 +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 4Vf7WN0Hn7z4KwN; Tue, 14 May 2024 20:39:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715719168; 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=Uhv+rgRjY6QkAfqeLnd/6hixpswIU0z6W9DaEfKOZ0E=; b=bjLNMfk3ecs4CH+Oh2h+xQJZQ7YNA/I9LuAmO5X6tlx9Oisb7+IwhH2km1NTwo5ckooUWb vLHEqjS5xNh1zECQfPkYEpvklTXv+oV51gj+Zjww1m7yEFHtKJQaZ0dvKGP30b3PZCwRD0 aEjl07A3yRRq0ba/BzJJ6m4IN07CjSzHcm0DV1VJsptjgR2khtD1pjBLw9LkuwnAbesszA 2QQWsvoOgh13nIHb9ypbXDmESUPBNAUA24p8ZeB7xJ7/iS17/+ifQ7x6YJNIIW/n56R04c kotYujDy2RatISyxC0DlF6z9wp4X21TjdRQyDuYNZ5CMWhJOe8opN9EtbXQg4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715719168; a=rsa-sha256; cv=none; b=e5tTMV0TsxkPrtFKrM/fuWUuymH2TPQry9wWUeLtU9EbW7kp7Hv0S4rRAQ23dxD8LGzRb3 r5WrpIy1mheCze2Juod47QURf30gjPU4LzFIxs6wTIi7a0sK0LkrCXazgfasYLo3wgQjCr TcULIK0phr4MaSI4WCK+tYYSkVjVMFshx1Kk5uXQ5iLNmnRLbg07uZkOgguIi8up9M1Ly5 dtZp/0dY77Cqzt7xMGi+79cfw8D5KnzhkN6x6zDr21G3xba/+hkAAvPf/+AmXCbKKjU70g 5KFbKLk+DX9PUhq65OVfyWELaz9nch/J50DMNxLBHpGsestJ0VrrmfCVpcs9GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715719168; 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=Uhv+rgRjY6QkAfqeLnd/6hixpswIU0z6W9DaEfKOZ0E=; b=SZwAeXtkgLa7yLV9g1wlIavHi9k7fJRaMIA2KF3Dw1cd/v+ykl1IldWcA0KbyHyxTieXza wlWfGsohJgYHf5U64Ho17jDn9+50TE/nnNmgexnn5YRuXIqCHviBe2MS5rnS+rnnasvGd2 cm/CpVEWCNvglnxCjoD3wd9U7esUB2MNVx9BeOUaf1S7hmEcNKaFKaMFoNxGg6Ffso8603 UvqKq9FPT8oTkRgVjfcbUB6tXQnrXFQgh7yEHZ5nJdLcKCwmfRzDielo2SgflYIXaV46LG z0ovaklOVkigOfDdqaSCJm2EeFzXkiHEflSLVjXmkcauqU5SE53PRFa//1kXhw== 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 4Vf7WM6zHCzmZT; Tue, 14 May 2024 20:39:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44EKdRV9092851; Tue, 14 May 2024 20:39:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44EKdRSn092848; Tue, 14 May 2024 20:39:27 GMT (envelope-from git) Date: Tue, 14 May 2024 20:39:27 GMT Message-Id: <202405142039.44EKdRSn092848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec Subject: git: f68ecf5d4fbd - stable/13 - fib_dxr: free() does nothing if arg is NULL, so remove a redundant 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f68ecf5d4fbd69dae868e474ff1f37d38e37c461 Auto-Submitted: auto-generated The branch stable/13 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=f68ecf5d4fbd69dae868e474ff1f37d38e37c461 commit f68ecf5d4fbd69dae868e474ff1f37d38e37c461 Author: Marko Zec AuthorDate: 2024-05-06 18:34:11 +0000 Commit: Marko Zec CommitDate: 2024-05-14 20:35:28 +0000 fib_dxr: free() does nothing if arg is NULL, so remove a redundant check. MFC after: 1 week --- 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 db4f4a537e22..55f79994f552 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)