diff options
author | jkh <jkh@FreeBSD.org> | 1996-05-09 07:13:16 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-05-09 07:13:16 +0000 |
commit | c55a4da98078442d79cdd2aa2aa3ffc0f487f318 (patch) | |
tree | ee04b5cb53600a192054a29f6537a94d4f120c04 /usr.sbin/pstat | |
parent | 00a71a5dd6c73f21950297fbc1ef710c31e28231 (diff) | |
download | FreeBSD-src-c55a4da98078442d79cdd2aa2aa3ffc0f487f318.zip FreeBSD-src-c55a4da98078442d79cdd2aa2aa3ffc0f487f318.tar.gz |
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 <charnier@lirmm.fr>
Diffstat (limited to 'usr.sbin/pstat')
-rw-r--r-- | usr.sbin/pstat/pstat.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |