From c55a4da98078442d79cdd2aa2aa3ffc0f487f318 Mon Sep 17 00:00:00 2001 From: jkh Date: Thu, 9 May 1996 07:13:16 +0000 Subject: Properly free up resources allocated in swapmode(). This is not quite the patch submitted by Philippe Charnier since he wasn't actually freeing the resources early enough (an earlier return could be invoked, leaving the resources still allocated), but he definitely pointed it out. Merci, Philippe! Suggested-By: Philippe Charnier --- usr.sbin/pstat/pstat.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'usr.sbin') diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 92d76f7..e7427ce 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -1157,6 +1157,8 @@ swapmode() * need to bother with totals. */ used = avail - nfree; + free(sw); + free(perdev); if (totalflag) { (void)printf("%dM/%dM swap space\n", used / 2048, avail / 2048); return; -- cgit v1.1