1
0
mirror of https://github.com/systemd/systemd synced 2025-10-06 00:13:24 +02:00

vmspawn: fix error handling

Follow-up for 9b5ba882bd.
This commit is contained in:
Yu Watanabe
2025-09-18 08:37:36 +09:00
parent c6e6c85f83
commit 794f12c778

View File

@@ -2107,7 +2107,8 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
return log_oom();
_cleanup_free_ char *image_fn = NULL;
if (path_extract_filename(arg_image, &image_fn) < 0)
r = path_extract_filename(arg_image, &image_fn);
if (r < 0)
return log_error_errno(r, "Failed to extract filename from path '%s': %m", image_fn);
_cleanup_free_ char *escaped_image_fn = escape_qemu_value(image_fn);