mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Previously the UNIX socket file was only removed on the success path (start_vmm returned Ok(Some(path))). If start_vmm failed after the HTTP API had bound a path-based socket, the file could be left on disk. Parse --api-socket in parse_api_socket(), call start_vmm with the result, then unlink the path in main after start_vmm returns for both success and failure (fd= mode unchanged: no path to remove). Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>