aboutsummaryrefslogtreecommitdiff
path: root/src/mm-cbm-part.h
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2025-05-19 23:18:15 +0200
committerDan Williams <dan@ioncontrol.co>2025-05-23 14:15:14 -0500
commitcdc6bf9529c37bff7197b479d3caa986bb9fc36b (patch)
tree6f3bc86a001408317d8b67a8dfe91d26f7c172e4 /src/mm-cbm-part.h
parent857efa1fba69cedaff48c1dff094c1b05afe66e8 (diff)
cbm-part: Use automatic cleanup
Safer than freeing the the struct in multiple places Signed-off-by: Guido Günther <agx@sigxcpu.org>
Diffstat (limited to 'src/mm-cbm-part.h')
-rw-r--r--src/mm-cbm-part.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mm-cbm-part.h b/src/mm-cbm-part.h
index f942ab0c..0cb9d108 100644
--- a/src/mm-cbm-part.h
+++ b/src/mm-cbm-part.h
@@ -59,6 +59,8 @@ MMCbmPart *mm_cbm_part_new_from_binary_pdu (const guint8 *pdu,
MMCbmPart *mm_cbm_part_new (void);
void mm_cbm_part_free (MMCbmPart *part);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMCbmPart, mm_cbm_part_free)
+
guint mm_cbm_part_get_part_num (MMCbmPart *part);
guint mm_cbm_part_get_num_parts (MMCbmPart *part);
const char *mm_cbm_part_get_text (MMCbmPart *part);