From: Kay Sievers Date: Wed, 30 May 2012 23:15:21 +0000 (+0200) Subject: udev: skip timestamp check if rules are already free()d during reload X-Git-Tag: v184~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da5d4bf64f96d21c664bc6fea37f4f28927beb2c;p=systemd udev: skip timestamp check if rules are already free()d during reload --- diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 930c4770..b5b54dd0 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; }