From 6b6fc332a421674109afb759d05c32c47dcc378f Mon Sep 17 00:00:00 2001 From: John Dennis Date: Thu, 11 Apr 2013 08:05:08 -0400 Subject: Implement get_joined_domain(), used to initialize Domain property. Add G_VARIANT_FREE & G_VARIANT_ITER_FREE macros that free the object and set the pointer to NULL. --- rdcp_util.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'rdcp_util.h') diff --git a/rdcp_util.h b/rdcp_util.h index eb7e533..aef255a 100644 --- a/rdcp_util.h +++ b/rdcp_util.h @@ -13,6 +13,22 @@ #define REALMD_SERVICE_NAME "OpenLMI Realmd Service" +#define G_VARIANT_FREE(variant) \ +{ \ + if (variant) { \ + g_variant_unref(variant); \ + variant = NULL; \ + } \ +} + +#define G_VARIANT_ITER_FREE(iter) \ +{ \ + if (iter) { \ + g_variant_iter_free(iter); \ + iter = NULL; \ + } \ +} + /** * octetstring_parse * @octetstring Pointer to octetstring data -- cgit