From 55f7dd064811d515a9e69c2646c7d6cbc1f07146 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Tue, 3 May 2016 21:57:00 +1000 Subject: [PATCH] vmstat: free before return Previous commit the free was added after the return. That doesn't work as planned. References: commit 6151b794c6a4f1958dee81fb17bad83b65166c8f --- vmstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmstat.c b/vmstat.c index 53677628..a5c62d6d 100644 --- a/vmstat.c +++ b/vmstat.c @@ -464,8 +464,8 @@ static int diskpartition_format(const char *partition_name) if (infinite_updates || i+1 < num_updates) sleep(sleep_time); } - return 0; procps_diskstat_unref(&disk_stat); + return 0; } static void diskheader(void)