1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00

tmpfiles: 'st' may have been used uninitialized

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-11-23 15:05:58 +01:00
parent baf60a80b5
commit 160dadc035

View File

@ -129,7 +129,9 @@ static int rm_rf_children_inner(
assert(fd >= 0);
assert(fname);
if (is_dir < 0 || (is_dir > 0 && (root_dev || (flags & REMOVE_SUBVOLUME)))) {
if (is_dir < 0 ||
root_dev ||
(is_dir > 0 && (root_dev || (flags & REMOVE_SUBVOLUME)))) {
r = fstatat_harder(fd, fname, &st, AT_SYMLINK_NOFOLLOW, flags);
if (r < 0)