Code

email plugin: Unlock mutexes before submitting the data.
[collectd.git] / src / load.c
index fbe6c4def58de57bb7dd60d95f3aa8e7c7f86f68..019f952c07066e7c753dbd193cc40d58ccab11d6 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * collectd - src/load.c
- * Copyright (C) 2005  Florian octo Forster
+ * Copyright (C) 2005,2006  Florian octo Forster
  *
  * 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
@@ -107,6 +107,7 @@ static void load_read (void)
        if (fgets (buffer, 16, loadavg) == NULL)
        {
                syslog (LOG_WARNING, "load: fgets: %s", strerror (errno));
+               fclose (loadavg);
                return;
        }