Page MenuHomeFreeBSD

Fix memory leak in vmstat
AcceptedPublic

Authored by trix_juniper.net on Mar 14 2017, 3:43 PM.

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
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

alc accepted this revision.Mar 14 2017, 4:54 PM
This revision is now accepted and ready to land.Mar 14 2017, 4:54 PM
will accepted this revision.May 7 2017, 6:19 AM