From 2a5d14e20697d4c93c34114dbac18d9b66046c68 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 22 Jan 2013 09:20:06 -0500 Subject: [PATCH] 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. --- src/uml/uml_driver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } -- GitLab