From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C850B45C73; Mon, 4 Nov 2024 09:45:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CAFE402AF; Mon, 4 Nov 2024 09:45:17 +0100 (CET) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 53B5E4021F for ; Mon, 4 Nov 2024 09:45:16 +0100 (CET) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id AF59185F4 for ; Mon, 4 Nov 2024 09:45:15 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id A32088793; Mon, 4 Nov 2024 09:45:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,AWL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=4.0.0 X-Spam-Score: -1.2 Received: from [192.168.1.85] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 1E826876B; Mon, 4 Nov 2024 09:45:11 +0100 (CET) Message-ID: <274fd900-5014-4ccd-abc8-3dad3f0dfd2e@lysator.liu.se> Date: Mon, 4 Nov 2024 09:45:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC v3 1/3] eal/lcore: add topology based functions To: Stephen Hemminger , Vipin Varghese Cc: dev@dpdk.org, roretzla@linux.microsoft.com, bruce.richardson@intel.com, john.mcnamara@intel.com, dmitry.kozliuk@gmail.com, jerinj@marvell.com, ruifeng.wang@arm.com, mattias.ronnblom@ericsson.com, anatoly.burakov@intel.com, ferruh.yigit@amd.com, honnappa.nagarahalli@arm.com, wathsala.vithanage@arm.com, konstantin.ananyev@huawei.com References: <20241030054133.520-1-vipin.varghese@amd.com> <20241030054133.520-2-vipin.varghese@amd.com> <20241030084437.24fe8265@hermes.local> Content-Language: en-US From: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= In-Reply-To: <20241030084437.24fe8265@hermes.local> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2024-10-30 16:44, Stephen Hemminger wrote: > On Wed, 30 Oct 2024 11:11:31 +0530 > Vipin Varghese wrote: > >> + if (topo_cnfg.io) { >> + free(topo_cnfg.io); >> + topo_cnfg.io = NULL; >> + } > > No need to check for NULL before calling free. If you do need to check for NULL, do it explicitly. if (topo_cnfg.io != NULL) /../