During shutdown there might be some unprocessed events
in the queue. So clear them up.
Signed-off-by: Hannes Reinecke <hare@suse.de>
pthread_mutex_unlock(uevq_lockp);
}
+void
+uevq_cleanup(struct list_head *tmpq)
+{
+ struct uevent *uev, *tmp;
+
+ list_for_each_entry_safe(uev, tmp, tmpq, node) {
+ list_del_init(&uev->node);
+ FREE(uev);
+ }
+}
+
/*
* Service the uevent queue.
*/
service_uevq(&uevq_tmp);
}
condlog(3, "Terminating uev service queue");
+ uevq_cleanup(&uevq);
return 0;
}