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:
John Ferlan 2013-01-22 09:20:06 -05:00 committed by Eric Blake
parent 8f7b75fbc3
commit 2a5d14e206

View File

@ -410,11 +410,13 @@ reread:
}
if (dom)
virObjectUnlock(dom);
if (event) {
umlDomainEventQueue(driver, event);
event = NULL;
}
}
cleanup:
if (event)
umlDomainEventQueue(driver, event);
umlDriverUnlock(driver);
}