swap plugin: Add a missing "free" in an error case.
[collectd.git] / src / swap.c
index 8ddf1e3..e5cbf33 100644 (file)
@@ -400,9 +400,10 @@ static int swap_read (void)
 
         if (total < avail)
         {
-                ERROR ("swap plugin: Total swap space (%"PRIu64") "
-                                "is less than free swap space (%"PRIu64").",
+                ERROR ("swap plugin: Total swap space (%"PRIi64") "
+                                "is less than free swap space (%"PRIi64").",
                                 total, avail);
+                sfree (s);
                 return (-1);
         }