diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 3d9e0e580c..f083f3f329 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2862,7 +2862,8 @@ qemuProcessCleanupChardevDevice(virDomainDefPtr def ATTRIBUTE_UNUSED, void *opaque ATTRIBUTE_UNUSED) { if (dev->source.type == VIR_DOMAIN_CHR_TYPE_UNIX && - dev->source.data.nix.listen) + dev->source.data.nix.listen && + dev->source.data.nix.path) unlink(dev->source.data.nix.path); return 0;