mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuDomainCreateNamespace: s/unlink/rmdir/
If something goes wrong in this function we try a rollback. That is unlink all the directories we created earlier. For some weird reason unlink() was called instead of rmdir(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
095f042ed6
commit
40ebbf72d5
@ -7467,9 +7467,9 @@ qemuDomainCreateNamespace(virQEMUDriverPtr driver,
|
|||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (devPath)
|
if (devPath)
|
||||||
unlink(devPath);
|
rmdir(devPath);
|
||||||
for (i = 0; i < ndevMountsSavePath; i++)
|
for (i = 0; i < ndevMountsSavePath; i++)
|
||||||
unlink(devMountsSavePath[i]);
|
rmdir(devMountsSavePath[i]);
|
||||||
}
|
}
|
||||||
virStringListFreeCount(devMountsSavePath, ndevMountsSavePath);
|
virStringListFreeCount(devMountsSavePath, ndevMountsSavePath);
|
||||||
VIR_FREE(devPath);
|
VIR_FREE(devPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user