From: Craig Small Date: Tue, 3 May 2016 11:57:00 +0000 (+1000) Subject: vmstat: free before return X-Git-Tag: v4.0.0~926 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55f7dd064811d515a9e69c2646c7d6cbc1f07146;p=procps-ng vmstat: free before return Previous commit the free was added after the return. That doesn't work as planned. References: commit 6151b794c6a4f1958dee81fb17bad83b65166c8f --- 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)