[PATCH] log: fix false oom error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case filter is new one an oom error message is reported.
This bug is introduced in 51b2606f. However this error does
not get into the log in the default configuration. To trigger
it one need to specify log outputs in LIBVIRT_LOG_OUTPUTS
variable.
---
 src/util/virlog.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/virlog.c b/src/util/virlog.c
index 06f9a60..f5b88b6 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -335,11 +335,12 @@ virLogDefineFilter(const char *match,
         goto cleanup;
 
     virLogFiltersSerial++;
+    ret = virLogNbFilters - 1;
  cleanup:
     virLogUnlock();
     if (ret < 0)
         virReportOOMError();
-    return virLogNbFilters;
+    return ret;
 }
 
 /**
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]