Add plist_to_bin_free() and plist_to_xml_free() functions that free memory allocated by plist_to_bin()/plist_to_xml()
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
@@ -620,6 +620,13 @@
     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.
      *
      * @param plist the root node to export
@@ -630,6 +637,13 @@
     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.
      *
      * @param plist_xml a pointer to the xml buffer.
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 @@
     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);
+}
diff --git a/src/xplist.c b/src/xplist.c
index 0cf4663..fa6bb6d 100644
--- a/src/xplist.c
+++ b/src/xplist.c
@@ -531,6 +531,11 @@
     str_buf_free(outbuf);
 }
 
+PLIST_API void plist_to_xml_free(char *plist_xml)
+{
+    free(plist_xml);
+}
+
 struct _parse_ctx {
     const char *pos;
     const char *end;