mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00: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:
|
||||
if (ret < 0) {
|
||||
if (devPath)
|
||||
unlink(devPath);
|
||||
rmdir(devPath);
|
||||
for (i = 0; i < ndevMountsSavePath; i++)
|
||||
unlink(devMountsSavePath[i]);
|
||||
rmdir(devMountsSavePath[i]);
|
||||
}
|
||||
virStringListFreeCount(devMountsSavePath, ndevMountsSavePath);
|
||||
VIR_FREE(devPath);
|
||||
|
Loading…
x
Reference in New Issue
Block a user