cpumf/lshwc: Free buffer allocated with malloc

Free all buffers allocated with malloc before program exit.
Handle memory leak in libcpumf_cpuset().

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Thomas Richter
2024-11-27 13:36:05 +01:00
committed by Jan Höppner
parent 9df45d4256
commit 3c5fb0f885
2 changed files with 7 additions and 5 deletions

View File

@@ -767,5 +767,6 @@ int main(int argc, char **argv)
}
free_counternames();
free(check);
free(ioctlbuffer);
return ch;
}