Page MenuHomeFreeBSD

Fix memory leak in vmstat
AcceptedPublic

Authored by trix_juniper.net on Mar 14 2017, 3:43 PM.
Tags
None
Referenced Files
F107419566: D10001.diff
Mon, Jan 13, 9:51 PM
F107419559: D10001.diff
Mon, Jan 13, 9:51 PM
Unknown Object (File)
Dec 15 2024, 2:15 AM
Unknown Object (File)
Nov 25 2024, 3:36 PM
Unknown Object (File)
Oct 4 2024, 11:25 AM
Unknown Object (File)
Oct 3 2024, 8:34 AM
Unknown Object (File)
Oct 3 2024, 12:12 AM
Unknown Object (File)
Oct 2 2024, 2:22 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