summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 475906f)
raw | patch | inline | side by side (parent: 475906f)
author | Florian Forster <octo@collectd.org> | |
Thu, 23 Feb 2012 09:23:27 +0000 (10:23 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 23 Feb 2012 09:23:27 +0000 (10:23 +0100) |
Change-Id: Ic4f9d2aae1aec9fbd83307fe3bb7d476f49f6827
src/sensors.c | patch | blob | history |
diff --git a/src/sensors.c b/src/sensors.c
index 96a54fca91cb56bc9bb825f93a749b291c2c71c7..7c1566c3022d9db096231d31fd3b5a7ee219041e 100644 (file)
--- a/src/sensors.c
+++ b/src/sensors.c
if (sensor_list == NULL)
sensor_list = ignorelist_create (1);
+ /* TODO: This setting exists for compatibility with old versions of
+ * lm-sensors. Remove support for those ancient versions in the next
+ * major release. */
if (strcasecmp (key, "SensorConfigFile") == 0)
{
- /* we will leak memory here if SensorConfigFile is
- used more than once, maybe we can just drop support
- for broken, extremely ancient libsensors? */
- conffile = strdup (value);
+ char *tmp = strdup (value);
+ if (tmp != NULL)
+ {
+ sfree (conffile);
+ conffile = tmp;
+ }
}
else if (strcasecmp (key, "Sensor") == 0)
{