libsensors: New method to free the memory allocated for the internal

representation of chip names.
sensord, sensors: Fix a memory leak when one or more chip names are
provided on the command line.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5740 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2009-06-20 10:04:52 +00:00
1 parent ef2f2c04ce
commit 78f496ca62
9 files changed
+44 -4

No files matched your search

+5
View File
@@ -54,6 +54,11 @@ sensors_bus *sensors_proc_bus = NULL;
int sensors_proc_bus_count = 0;
int sensors_proc_bus_max = 0;
void sensors_free_chip_name(sensors_chip_name *chip)
{
free(chip->prefix);
}
/*
Parse a chip name to the internal representation. These are valid names: