From 83c325d54efa1187a27fe0aa9709752087d5fe97 Mon Sep 17 00:00:00 2001 From: Ondrej Čerman Date: Sun, 4 Nov 2018 21:58:31 +0100 Subject: devices/sensors: bug fix - read_sensor_labels never gets called --- modules/devices/sensors.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/devices/sensors.c b/modules/devices/sensors.c index de89b1bf..e66aac67 100644 --- a/modules/devices/sensors.c +++ b/modules/devices/sensors.c @@ -26,6 +26,7 @@ gchar *sensors = NULL; GHashTable *sensor_compute = NULL; GHashTable *sensor_labels = NULL; +gboolean hwmon_first_run = TRUE; static void read_sensor_labels(gchar *driver) { FILE *conf; @@ -264,7 +265,7 @@ static void read_sensors_hwmon(void) { driver = determine_driver_for_hwmon_path(path_hwmon); DEBUG("hwmon%d has driver=%s", hwmon, driver); - if (!sensor_labels) { + if (hwmon_first_run) { read_sensor_labels(driver); } @@ -312,9 +313,9 @@ static void read_sensors_hwmon(void) { path_hwmon = get_sensor_path(++hwmon, *prefix); } - g_free(path_hwmon); } + hwmon_first_run = FALSE; } static void read_sensors_acpi(void) { -- cgit v1.2.3