Code

swap plugin: Add a missing "free" in an error case.
authorFlorian Forster <octo@huhu.verplant.org>
Wed, 19 May 2010 09:30:42 +0000 (11:30 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Wed, 19 May 2010 09:30:42 +0000 (11:30 +0200)
Also fixes a minor format string problem.

src/swap.c

index 8ddf1e340785f9d9c51d14c085ce5985b3cce0c0..e5cbf3336c8da55e8a8fe1303df6ba85ebc9df41 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);
         }