[PATCH REPOST 17/38] virlog: Introduce virLogFilterFree

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

 



Complementary method to virLogFilterNew.
---
 src/util/virlog.c | 10 ++++++++++
 src/util/virlog.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/src/util/virlog.c b/src/util/virlog.c
index 5da1af7..36fecda 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -1620,3 +1620,13 @@ virLogOutputListFree(virLogOutputPtr *list, int count)
         virLogOutputFree(list[i]);
     VIR_FREE(list);
 }
+
+void
+virLogFilterFree(virLogFilterPtr filter)
+{
+    if (!filter)
+        return;
+
+    VIR_FREE(filter->match);
+    VIR_FREE(filter);
+}
diff --git a/src/util/virlog.h b/src/util/virlog.h
index 4f0eea7..eec3a5d 100644
--- a/src/util/virlog.h
+++ b/src/util/virlog.h
@@ -196,6 +196,7 @@ extern int virLogOutputNew(virLogOutputFunc f,
                            const char *name,
                            unsigned int flags);
 extern void virLogOutputFree(virLogOutputPtr output);
+extern void virLogFilterFree(virLogFilterPtr filter);
 extern void virLogOutputListFree(virLogOutputPtr *list, int count);
 
 /*
-- 
2.4.11

--
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]