diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e27cd0d407ebe3e2c6b5c02a5c8848fd8c4442a0..9fe8fdcb8e0e5afa8c4fdae223a1d227552a4646 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3348,10 +3348,8 @@ qemuProcessBuildDestroyMemoryPathsImpl(virQEMUDriverPtr driver, return -1; } } else { - if (rmdir(path) < 0 && - errno != ENOENT) - VIR_WARN("Unable to remove hugepage path: %s (errno=%d)", - path, errno); + if (virFileDeleteTree(path) < 0) + return -1; } return 0;