mirror of
https://github.com/systemd/systemd.git
synced 2026-07-27 03:39:09 +00:00
udev: skip timestamp check if rules are already free()d during reload
This commit is contained in:
@@ -1858,6 +1858,9 @@ bool udev_rules_check_timestamp(struct udev_rules *rules)
|
||||
unsigned int i;
|
||||
bool changed = false;
|
||||
|
||||
if (rules == NULL)
|
||||
goto out;
|
||||
|
||||
for (i = 0; rules->dirs[i]; i++) {
|
||||
struct stat stats;
|
||||
|
||||
@@ -1876,7 +1879,7 @@ bool udev_rules_check_timestamp(struct udev_rules *rules)
|
||||
/* update timestamp */
|
||||
rules->dirs_ts_usec[i] = ts_usec(&stats.st_mtim);
|
||||
}
|
||||
|
||||
out:
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user