mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-06 13:20:20 +00:00
uml: Avoid resource leak of event in umlInofityEvent
If there was more than one inotify_event found in the read/while loop, then only the last event found would have been queued.
This commit is contained in:
parent
8f7b75fbc3
commit
2a5d14e206
@ -410,11 +410,13 @@ reread:
|
|||||||
}
|
}
|
||||||
if (dom)
|
if (dom)
|
||||||
virObjectUnlock(dom);
|
virObjectUnlock(dom);
|
||||||
|
if (event) {
|
||||||
|
umlDomainEventQueue(driver, event);
|
||||||
|
event = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (event)
|
|
||||||
umlDomainEventQueue(driver, event);
|
|
||||||
umlDriverUnlock(driver);
|
umlDriverUnlock(driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user