mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-27 12:30:43 +00:00
fix 2 leaks found by valgrind - missing some free() during cleanup
(as opposed to ongoing run-time leaks) git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3293 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
fd2023d0cf
commit
e620cb652c
1 file changed
+5
@@ -106,6 +106,11 @@ void free_chip(sensors_chip chip)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < chip.chips.fits_count; i++)
|
||||
free_chip_name(chip.chips.fits[i]);
|
||||
free(chip.chips.fits);
|
||||
chip.chips.fits_count = chip.chips.fits_max = 0;
|
||||
|
||||
for (i = 0; i < chip.labels_count; i++)
|
||||
free_label(chip.labels[i]);
|
||||
free(chip.labels);
|
||||
|
||||
Reference in new issue
Block a user