From: John Ferlan Date: Tue, 22 Jan 2013 14:20:06 +0000 (-0500) Subject: uml: Avoid resource leak of event in umlInofityEvent X-Git-Tag: v1.0.2-rc1~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a5d14e20697d4c93c34114dbac18d9b66046c68;p=thirdparty%2Flibvirt.git 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. --- diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index c6fef698a8..705495e8c6 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -410,11 +410,13 @@ reread: } if (dom) virObjectUnlock(dom); + if (event) { + umlDomainEventQueue(driver, event); + event = NULL; + } } cleanup: - if (event) - umlDomainEventQueue(driver, event); umlDriverUnlock(driver); }