Code

swap plugin: fix leak on error
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 10 Aug 2016 15:17:57 +0000 (17:17 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 10 Aug 2016 15:17:57 +0000 (17:17 +0200)
src/swap.c

index 15eca9aad74b4c1858f599b2701cd8541cd94fd3..9c63e9bbb56ca82a7e4ce25de7219d79aa8040d2 100644 (file)
@@ -674,6 +674,7 @@ static int swap_read (void) /* {{{ */
        {
                ERROR ("swap plugin: Total swap space (%g) is less than used swap space (%g).",
                                total, used);
+               sfree (swap_entries);
                return (-1);
        }