Snipped > > On Wed, 30 Oct 2024 11:11:31 +0530 > Vipin Varghese <vipin.vargh...@amd.com> wrote: > > > + if (topo_cnfg.io) { > > + free(topo_cnfg.io); > > + topo_cnfg.io = NULL; > > + } > > No need to check for NULL before calling free.
Thank you Stepehen on this, the reason why we specifically added to address 2 scenarios 1. as pointed out by Wathsala where System Level Cache will be disabled; where L3 will be not available at all 2. for version where hwloc does not detect the specific cache level. By checking the NULL we can avoid such cases. Note: I will recheck and add|remove this in v4