Page MenuHomeFreeBSD

Fix memory leak in vmstat
AcceptedPublic

Authored by trix_juniper.net on Mar 14 2017, 3:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 21 2024, 11:26 PM
Unknown Object (File)
Dec 19 2023, 1:56 PM
Unknown Object (File)
Dec 14 2023, 8:39 AM
Unknown Object (File)
Dec 13 2023, 6:27 AM
Unknown Object (File)
Nov 28 2023, 8:10 AM
Unknown Object (File)
Jul 24 2023, 12:37 AM
Unknown Object (File)
Jun 22 2023, 3:14 AM
Unknown Object (File)
Jun 8 2023, 4:25 AM
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