]> err.no Git - systemd/commitdiff
udev: skip timestamp check if rules are already free()d during reload
authorKay Sievers <kay@vrfy.org>
Wed, 30 May 2012 23:15:21 +0000 (01:15 +0200)
committerKay Sievers <kay@mop.(none)>
Wed, 30 May 2012 23:17:59 +0000 (01:17 +0200)
src/udev/udev-rules.c

index 930c4770fec9d54990c4cd3d556059044a0bd703..b5b54dd0431d5e021ef1cabac629869eb7203d4a 100644 (file)
@@ -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;
 }