From 4d4586903b4cbab8b307a406e894e34b4b19a723 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 7 Nov 2019 02:59:05 +0100 Subject: Add plist_to_bin_free() and plist_to_xml_free() functions that free memory allocated by plist_to_bin()/plist_to_xml() --- include/plist/plist.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include') diff --git a/include/plist/plist.h b/include/plist/plist.h index 7a41fb4..824ba43 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h @@ -619,6 +619,13 @@ extern "C" */ void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); + /** + * Frees the memory allocated by plist_to_xml(). + * + * @param plist_xml The buffer allocated by plist_to_xml(). + */ + void plist_to_xml_free(char *plist_xml); + /** * Export the #plist_t structure to binary format. * @@ -629,6 +636,13 @@ extern "C" */ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); + /** + * Frees the memory allocated by plist_to_bin(). + * + * @param plist_bin The buffer allocated by plist_to_bin(). + */ + void plist_to_bin_free(char *plist_bin); + /** * Import the #plist_t structure from XML format. * -- cgit v1.1-32-gdbae