[RFC v3 1/3] eal/lcore: add topology based functions

Mattias Rönnblom hofors at lysator.liu.se
Mon Nov 4 09:45:11 CET 2024


On 2024-10-30 16:44, Stephen Hemminger wrote:
> On Wed, 30 Oct 2024 11:11:31 +0530
> Vipin Varghese <vipin.varghese at amd.com> 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) /../


More information about the dev mailing list