* SECTION:libudev-queue
* @short_description: access to currently active events
*
- * The udev daemon processes event asynchronously. All events wich do not have
+ * The udev daemon processes event asynchronously. All events which do not have
* interdependencies are run in parallel. This exports the current state of the
* event processing queue, and the currently event sequence numbers from the kernel
* and the udev daemon.
return 1;
if (start < seqnum)
start = seqnum;
- if (start > end)
+ if (start > end) {
+ fclose(queue_file);
return 1;
- if (end - start > INT_MAX - 1)
+ }
+ if (end - start > INT_MAX - 1) {
+ fclose(queue_file);
return -EOVERFLOW;
+ }
unfinished = (end - start) + 1;
while (unfinished > 0) {