CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/11/11 12:29:25
Modified files:
usr.sbin/vmd : parse.y vmd.c
Log message:
vmd(8): Do not leak vm_kernel_path
When vm.conf is reloaded, vm_register() returns EALREADY and hands
back the existing VM, whose vm_kernel_path the parser then overwrites
without freeing the old string. Free it first. While there, also free
the parsed path when vm_register() fails or when running with -n, as it
is never handed over to a VM in those cases.
vm_remove() freed vm_kernel_path only if vm_from_config was not set.
However, the parser is the only place that assigns vm_kernel_path, and
it sets vm_from_config at the same time, so the path was never freed.
Free it unconditionally.
ok dv@