Page MenuHomeFreeBSD

kvm_nlist(3) leaks allocated memory
ClosedPublic

Authored by jkim on Mar 2 2021, 7:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 29, 5:09 AM
Unknown Object (File)
Fri, Nov 28, 11:29 PM
Unknown Object (File)
Fri, Nov 28, 8:52 PM
Unknown Object (File)
Fri, Nov 28, 8:24 AM
Unknown Object (File)
Thu, Nov 27, 11:07 AM
Unknown Object (File)
Sat, Nov 22, 11:28 PM
Unknown Object (File)
Sun, Nov 16, 9:43 AM
Unknown Object (File)
Sun, Nov 16, 9:41 AM
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