summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared/nm-macros-internal.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/shared/nm-macros-internal.h b/shared/nm-macros-internal.h
index 9971f15c8c..aa38bacf55 100644
--- a/shared/nm-macros-internal.h
+++ b/shared/nm-macros-internal.h
@@ -24,12 +24,14 @@
/********************************************************/
+#define nm_auto(fcn) __attribute ((cleanup(fcn)))
+
/**
* nm_auto_free:
*
* Call free() on a variable location when it goes out of scope.
*/
-#define nm_auto_free __attribute__ ((cleanup(_nm_auto_free_impl)))
+#define nm_auto_free nm_auto(_nm_auto_free_impl)
GS_DEFINE_CLEANUP_FUNCTION(void*, _nm_auto_free_impl, free)
/********************************************************/