Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util.c | 6 ++++++
src/util.h | 11 +++++++++++
2 files changed, 17 insertions(+)
diff --git a/src/util.c b/src/util.c
index b21f2c5..ac965c4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -20,6 +20,12 @@ virtDBusErrorQuark(void)
return (GQuark) quarkVolatile;
}
+void
+virtDBusUtilTypedParamsClear(virtDBusUtilTypedParams *params)
+{
+ virTypedParamsFree(params->params, params->nparams);
+}
+
GVariant *
virtDBusUtilTypedParamsToGVariant(virTypedParameterPtr params,
gint nparams)
diff --git a/src/util.h b/src/util.h
index 7bb4ad6..4ffc15c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -16,6 +16,17 @@ typedef enum {
GQuark
virtDBusErrorQuark(void);
+struct _virtDBusUtilTypedParams {
+ virTypedParameterPtr params;
+ gint nparams;
+};
+typedef struct _virtDBusUtilTypedParams virtDBusUtilTypedParams;
+
+void
+virtDBusUtilTypedParamsClear(virtDBusUtilTypedParams *params);
+
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virtDBusUtilTypedParams, virtDBusUtilTypedParamsClear);
+
GVariant *
virtDBusUtilTypedParamsToGVariant(virTypedParameterPtr params,
gint nparams);
--
2.14.3