mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
switch-root: do not use close old_root_fd after rm_rf_children()
rm_rf_children() has already closed the fd with closedir().
This commit is contained in:
parent
7925c22a78
commit
b46178e5c2
@ -111,8 +111,10 @@ int switch_root(const char *new_root) {
|
||||
|
||||
if (fstat(old_root_fd, &rb) < 0)
|
||||
log_warning("Failed to stat old root directory, leaving: %m");
|
||||
else
|
||||
else {
|
||||
rm_rf_children(old_root_fd, false, false, &rb);
|
||||
old_root_fd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
r = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user