X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=libudev%2Flibudev-queue.c;h=f06c9e8a7a3caaeced9653bc7678f50a2adb0fa5;hp=691e6a7919ec397242a9b73be1198a0b4a29d076;hb=26347a4c5538008318188118872490128f43fcd3;hpb=8d6bc73aefb5dcfd36d9456ab2209bc410086f82 diff --git a/libudev/libudev-queue.c b/libudev/libudev-queue.c index 691e6a791..f06c9e8a7 100644 --- a/libudev/libudev-queue.c +++ b/libudev/libudev-queue.c @@ -28,7 +28,7 @@ * 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. @@ -360,10 +360,14 @@ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, 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) {