summaryrefslogtreecommitdiff
path: root/include/asterisk/astobj2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/astobj2.h')
-rw-r--r--include/asterisk/astobj2.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index 15ed4892e..a5068ebe6 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -1461,4 +1461,10 @@ void *__ao2_iterator_next(struct ao2_iterator *iter);
/* extra functions */
void ao2_bt(void); /* backtrace */
+/*! gcc __attribute__(cleanup()) functions
+ * \note they must be able to handle NULL parameters because most of the
+ * allocation/find functions can fail and we don't want to try to tear
+ * down a NULL */
+void ao2_cleanup(void *obj);
+void ao2_iterator_cleanup(struct ao2_iterator *iter);
#endif /* _ASTERISK_ASTOBJ2_H */