From 4b58ecb592d5394fd426462eaa48a3e2ac26c774 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 12 Mar 2021 17:05:42 +0100 Subject: [PATCH] shared: add nm_auto_unref_keyfile macro --- shared/nm-glib-aux/nm-macros-internal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h index c08f9cd0c0..5aa6344411 100644 --- a/shared/nm-glib-aux/nm-macros-internal.h +++ b/shared/nm-glib-aux/nm-macros-internal.h @@ -253,6 +253,9 @@ static inline int nm_close (int fd); NM_AUTO_DEFINE_FCN_VOID0 (void *, _nm_auto_free_impl, free) #define nm_auto_free nm_auto(_nm_auto_free_impl) +NM_AUTO_DEFINE_FCN0 (GKeyFile *, _nm_auto_unref_keyfile, g_key_file_unref); +#define nm_auto_unref_keyfile nm_auto(_nm_auto_unref_keyfile) + NM_AUTO_DEFINE_FCN0 (GVariantIter *, _nm_auto_free_variant_iter, g_variant_iter_free) #define nm_auto_free_variant_iter nm_auto(_nm_auto_free_variant_iter)