summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06663d3)
raw | patch | inline | side by side (parent: 06663d3)
author | octo <octo> | |
Sat, 10 Jun 2006 13:57:55 +0000 (13:57 +0000) | ||
committer | octo <octo> | |
Sat, 10 Jun 2006 13:57:55 +0000 (13:57 +0000) |
Thanks to Olaf Rempel for this patch.
src/cpufreq.c | patch | blob | history | |
src/hddtemp.c | patch | blob | history | |
src/load.c | patch | blob | history |
diff --git a/src/cpufreq.c b/src/cpufreq.c
index b26c35e161eb09d17c329ce8d22c1c498f76f3c8..ba0149ad1f390298af4049690cc56c9458f4c8b7 100644 (file)
--- a/src/cpufreq.c
+++ b/src/cpufreq.c
if (fgets (buffer, 16, fp) == NULL)
{
syslog (LOG_WARNING, "cpufreq: fgets: %s", strerror (errno));
+ fclose (fp);
return;
}
diff --git a/src/hddtemp.c b/src/hddtemp.c
index 08bbbc0270bc5a0c0a4b3c712a4f7bb6cfea1382..80b3419bee76d3e96efacb242bdba4f946efc5be 100644 (file)
--- a/src/hddtemp.c
+++ b/src/hddtemp.c
syslog (LOG_ERR, "hddtemp: Error reading from socket: %s",
strerror (errno));
+ close (fd);
return (-1);
}
buffer_fill += status;
first_hddname = entry;
}
}
+ fclose (fh);
}
else
DBG ("Could not open /proc/partitions: %s",
diff --git a/src/load.c b/src/load.c
index 4d43dd45cb7f9a93f391117d2048b70ced049261..019f952c07066e7c753dbd193cc40d58ccab11d6 100644 (file)
--- a/src/load.c
+++ b/src/load.c
if (fgets (buffer, 16, loadavg) == NULL)
{
syslog (LOG_WARNING, "load: fgets: %s", strerror (errno));
+ fclose (loadavg);
return;
}