diff options
author | Kay Sievers <kay@vrfy.org> | 2012-05-31 01:15:21 +0200 |
---|---|---|
committer | Kay Sievers <kay@mop.(none)> | 2012-05-31 01:17:59 +0200 |
commit | da5d4bf64f96d21c664bc6fea37f4f28927beb2c (patch) | |
tree | 31d2ba982a55ce4f0bf3bb6f2bf1b3d75451b874 /src/udev/udev-rules.c | |
parent | 107a2db901d93ffaba4a2fe34e6b28643b96574f (diff) |
udev: skip timestamp check if rules are already free()d during reload
Diffstat (limited to 'src/udev/udev-rules.c')
-rw-r--r-- | src/udev/udev-rules.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 930c4770fe..b5b54dd043 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -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; } |