]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virHostCPUGetInfoPopulateLinux: Use automatic memory freeing
authorPeter Krempa <pkrempa@redhat.com>
Mon, 7 Apr 2025 11:49:21 +0000 (13:49 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 9 Apr 2025 16:03:29 +0000 (18:03 +0200)
commitf883dab020a90b890f0e2cbc8b954168159074e2
treee671e660240fbc58e5ab3ded9b20cb9bfe35a9fd
parent9a747afe6cf5335419cf9e76fb2d5657c1667232
virHostCPUGetInfoPopulateLinux: Use automatic memory freeing

Use 'g_autfree' for the two temporary strings.

'sysfs_cpudir' was used in two places, one of which is in a loop. Add
another helper variable for it and declare the other one in the loop.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virhostcpu.c