src/utils_avltree.c: Fixed the first few bugs.
[collectd.git] / src / cpufreq.c
index 797bee7..ba0149a 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * collectd - src/cpufreq.c
- * Copyright (C) 2005  Peter Holik
+ * Copyright (C) 2005,2006  Peter Holik
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ static void cpufreq_read (void)
                if (fgets (buffer, 16, fp) == NULL)
                {
                        syslog (LOG_WARNING, "cpufreq: fgets: %s", strerror (errno));
+                       fclose (fp);
                        return;
                }