mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 03:21:44 +03:00
qemu_driver.c: don't unlink(NULL) on OOM error path
* src/qemu/qemu_driver.c (qemudDomainMigratePrepareTunnel): Upon an out of memory error, we would end up with unixfile==NULL and attempt to unlink(NULL). Skip the unlink when it's NULL.
This commit is contained in:
parent
49226d2ce4
commit
1428704d2a
@ -6903,7 +6903,8 @@ endjob:
|
||||
|
||||
cleanup:
|
||||
virDomainDefFree(def);
|
||||
unlink(unixfile);
|
||||
if (unixfile)
|
||||
unlink(unixfile);
|
||||
VIR_FREE(unixfile);
|
||||
if (vm)
|
||||
virDomainObjUnlock(vm);
|
||||
|
Loading…
Reference in New Issue
Block a user