]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libvmmapi: Add vm_close()
authorVitaliy Gusev <gusev.vitaliy@gmail.com>
Thu, 30 Jun 2022 21:21:57 +0000 (14:21 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 30 Jun 2022 21:21:57 +0000 (14:21 -0700)
commitf0880ab791a510391a12f2ab7b01889b6774bca0
tree4bbe042fbc9f83594658b975b4ed4dc4732d1320
parent87f49967d3249e0b536beaa9c7fb5604d5a3919a
libvmmapi: Add vm_close()

Currently there is no way to safely free a vm structure without
leaking the fd.  vm_destroy() closes the fd but also destroys the VM
whereas in some cases a VM needs to be opened (vm_open) and then
closed (vm_close).

Reviewed by: jhb
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D35073
lib/libvmmapi/vmmapi.c
lib/libvmmapi/vmmapi.h