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() --- src/bplist.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/bplist.c') diff --git a/src/bplist.c b/src/bplist.c index e0e7622..f0b8f0e 100644 --- a/src/bplist.c +++ b/src/bplist.c @@ -1379,3 +1379,8 @@ PLIST_API void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length) bplist_buff->data = NULL; // make sure we don't free the output buffer byte_array_free(bplist_buff); } + +PLIST_API void plist_to_bin_free(char *plist_bin) +{ + free(plist_bin); +} -- cgit v1.1-32-gdbae