summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-17 15:46:37 +0200
committerTom Gundersen <teg@jklm.no>2015-04-23 22:31:25 +0200
commit353f605867f9dac1eea4ad8ebaa92a004cbcd9e7 (patch)
treee9c55daeea740937b8663afa28dae8ec5735cae3 /src/udev/udev-event.c
parent378f61ebef6d29efce8512402a73df880c7d960c (diff)
udev: event - update tags before writing out db
The old tags are read from the db when deciding which tags to clear, make sure we don't write out the new db before the old one has been read.
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index bda06385ea..978b21832d 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -877,12 +877,11 @@ void udev_event_execute_rules(struct udev_event *event,
udev_device_ensure_usec_initialized(event->dev, event->dev_db);
/* (re)write database file */
- udev_device_update_db(dev);
udev_device_tag_index(dev, event->dev_db, true);
+ udev_device_update_db(dev);
udev_device_set_is_initialized(dev);
- udev_device_unref(event->dev_db);
- event->dev_db = NULL;
+ event->dev_db = udev_device_unref(event->dev_db);
}
}