Page MenuHomeFreeBSD

kvm_nlist(3) leaks allocated memory
ClosedPublic

Authored by jkim on Mar 2 2021, 7:59 PM.
Tags
None
Referenced Files
F146428982: D29019.id85085.diff
Mon, Mar 2, 3:23 PM
F146365359: D29019.id85085.diff
Mon, Mar 2, 2:48 AM
Unknown Object (File)
Thu, Feb 26, 7:01 PM
Unknown Object (File)
Tue, Feb 24, 8:47 PM
Unknown Object (File)
Dec 10 2025, 12:49 AM
Unknown Object (File)
Dec 10 2025, 12:49 AM
Unknown Object (File)
Nov 29 2025, 5:09 AM
Unknown Object (File)
Nov 28 2025, 11:29 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 Skipped
Unit
Tests Skipped