From da5d4bf64f96d21c664bc6fea37f4f28927beb2c Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 31 May 2012 01:15:21 +0200 Subject: [PATCH] udev: skip timestamp check if rules are already free()d during reload --- src/udev/udev-rules.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.39.5