mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-01-25 08:29:59 +07:00
udev_queue_get_seqnum_sequence_is_finished(): fix possible file handle leak
This commit is contained in:
parent
6d837a5348
commit
9e6273c713
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user