Page MenuHomeFreeBSD

kvm_nlist(3) leaks allocated memory
ClosedPublic

Authored by jkim on Mar 2 2021, 7:59 PM.
Tags
None
Referenced Files
F136169583: D29019.id84998.diff
Sun, Nov 16, 9:43 AM
F136169424: D29019.id85081.diff
Sun, Nov 16, 9:41 AM
F136157954: D29019.diff
Sun, Nov 16, 7:03 AM
Unknown Object (File)
Sat, Nov 8, 10:18 PM
Unknown Object (File)
Mon, Nov 3, 10:14 PM
Unknown Object (File)
Wed, Oct 29, 9:27 AM
Unknown Object (File)
Wed, Oct 29, 9:05 AM
Unknown Object (File)
Sun, Oct 26, 9:17 PM
Subscribers
None

Details

Summary

A user reported kvm_nlist(3) leaks memory. I found there are two leaks. First, it had to free(3) dpcpu_off (introduced in rS204494) from kvm_close(3). Second, it is not free()'ing temporary buffer introduced in D3341 (rS291406). Also, an unchecked calloc(3) failure was fixed while I am in the neighborhood.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable