Page MenuHomeFreeBSD

Fix memory leak in vmstat
AcceptedPublic

Authored by trix_juniper.net on Mar 14 2017, 3:43 PM.
Tags
Referenced Files
F141026631: D10001.diff
Tue, Dec 30, 10:24 PM
Unknown Object (File)
Fri, Dec 5, 2:04 AM
Unknown Object (File)
Nov 19 2025, 12:45 PM
Unknown Object (File)
Nov 9 2025, 11:27 PM
Unknown Object (File)
Nov 8 2025, 6:12 PM
Unknown Object (File)
Nov 3 2025, 2:09 PM
Unknown Object (File)
Oct 24 2025, 4:45 AM
Unknown Object (File)
Oct 21 2025, 8:25 PM
Subscribers

Details

Reviewers
alc
will
Summary

vmstat.c dointr
Free memory assigned to intrnames before returning.
Free memory assigned to intrcnts before breaking out of while loop. Move assignment of old_intrcnts to after the break check because it isn't needed before the check.

Test Plan

Use clang's static analyzer, scan-build, to find the problem and later to show resolution.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped