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

[libvirt] [PATCH 17/38] virlog: Introduce virLogFilterFree



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.3


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