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>
This commit is contained in:
Jordan K. Hubbard 1996-05-09 07:13:16 +00:00
parent 00bbf73734
commit fb59e630f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15693

View File

@ -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;