mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-26 04:54:07 +01:00
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:
parent
00bbf73734
commit
fb59e630f6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15693
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user