mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +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