Page MenuHomeFreeBSD

kvm_nlist(3) leaks allocated memory
ClosedPublic

Authored by jkim on Mar 2 2021, 7:59 PM.
Tags
None
Referenced Files
F152507279: D29019.id85085.diff
Wed, Apr 15, 9:52 AM
Unknown Object (File)
Sat, Apr 11, 5:04 PM
Unknown Object (File)
Sat, Apr 11, 3:37 PM
Unknown Object (File)
Sat, Apr 11, 3:26 PM
Unknown Object (File)
Sat, Apr 11, 10:54 AM
Unknown Object (File)
Sun, Apr 5, 4:00 PM
Unknown Object (File)
Sat, Mar 28, 4:40 AM
Unknown Object (File)
Sun, Mar 22, 2:19 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