diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 56bcec5ffe580c21b21b00e2e22e0c3ae7408144..c782f0dab913fa74bf862d1e77b18b3a9a61716b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6903,7 +6903,8 @@ endjob: cleanup: virDomainDefFree(def); - unlink(unixfile); + if (unixfile) + unlink(unixfile); VIR_FREE(unixfile); if (vm) virDomainObjUnlock(vm);