From nobody Mon May 06 18:37:53 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 4VY9Bn6mZKz5J2pL; Mon, 06 May 2024 18:37:53 +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 4VY9Bn6G07z3xXc; Mon, 6 May 2024 18:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715020673; 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=5a0TBdIqywgQjMYwpmMO1SHkv1ve3xxqzItcAFrnAJs=; b=jpJYTnpUDjuyNDUFAMrT2FjlvbCgcWSL7+Ph3nqPoso1aQj5NDjwUODRhhqIotggCcgINR 5iS8ZyoNcs5PVHGW+xFhNyM/WFpSh6y8nxGP5Dj8us7un2LYH4ocWw0ZprbkC97gpfzy9G 6flC6srLZdH0h5WX7Xn3E8yX8xAfqMSvW1QNRBjGVtz19V5lq2AfloSsYnOgzwAXrxzhlR GzpJTetZfjGfCd019brsvrxYWMI19F3cvWZtzCxfg/z53NQ6QxCDaqEjD+mV98VzICE8M+ Id6Qh3WloQGg+QXCbxXfBU86KRSokJZ1JAGn9ai2BDkHJUn9f+TEXnjbVbrzuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715020673; a=rsa-sha256; cv=none; b=CmNFG74yWY9xCGBOe4EME3kjEdmNL+gZ4+lTfwmGWFDoGcuV247glLpdfaPNmWwo+H52V+ R79q2RYVBO/dot89kzPOBbnOJz1N236d5NW7w611TmAFjfyy3Pjq7EgdOBjy8mGJSaEztU WgGHZW7Qega62bb3wOD4JVPIauAoKid2BYRF9V9r/yaq5SiEp9Qo5Gs245bESG7TpMur0g lY8IHwPf2qR5kxcgC7vzd6OcDzqtTix133Hvwlt91Froqw2mdoZKc/rIM2fxictmjbUGk7 KJojIMEp4nkCJom1KNFWuRE1I/atXLbJA2+36rkOysm+YHFslVwnPv7UlIVNqw== 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=1715020673; 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=5a0TBdIqywgQjMYwpmMO1SHkv1ve3xxqzItcAFrnAJs=; b=EmzvH40jRNwsdcH8ygthneRQ9HMl2nRxtrkWsbgtluUOu1Jm93oWsRi7cI6C27da6kgkrR XYCIknk2AQ4BHFhXoWqpJpfprX4FsnxEVKe6kRxkVEnmPSpjBCnPtVKVMM2g4iIWRqvro1 hoG3qq9SANDrAPCGyq7LFfUhoFCdjsO2XS9sMvle7W8Why16CraIYemBlSs9NZqxbocrBT in4qMJlkYFyma1dPRqVxqwhoFWy3hujepwGD4imDrLgP9EdCQlxmN6zDXOrqBy0m0O2qkB ZkS3zEagY9rpJ21osgPiFgmblmLOGRu15VPgapkv6pGG65/M6LhEG3AyLWCcZA== 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 4VY9Bn5sBdz17dx; Mon, 6 May 2024 18:37:53 +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 446IbrXD060774; Mon, 6 May 2024 18:37:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 446IbrFp060771; Mon, 6 May 2024 18:37:53 GMT (envelope-from git) Date: Mon, 6 May 2024 18:37:53 GMT Message-Id: <202405061837.446IbrFp060771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marko Zec Subject: git: 858010643c54 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 858010643c54c4c03e477ce452b0a0c25ecc405a Auto-Submitted: auto-generated The branch main has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=858010643c54c4c03e477ce452b0a0c25ecc405a commit 858010643c54c4c03e477ce452b0a0c25ecc405a Author: Marko Zec AuthorDate: 2024-05-06 18:34:11 +0000 Commit: Marko Zec CommitDate: 2024-05-06 18:37:44 +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)