1
0
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:
Jim Meyering 2009-12-14 16:41:11 +01:00
parent 49226d2ce4
commit 1428704d2a

View File

@ -6903,7 +6903,8 @@ endjob:
cleanup:
virDomainDefFree(def);
unlink(unixfile);
if (unixfile)
unlink(unixfile);
VIR_FREE(unixfile);
if (vm)
virDomainObjUnlock(vm);