diff options
author | Nikias Bassen | 2016-06-29 13:17:00 +0200 |
---|---|---|
committer | Nikias Bassen | 2016-06-29 13:17:00 +0200 |
commit | 16f45a04f8790f36e5af939bfd728ee410470e05 (patch) | |
tree | f92be6bb3f0663f21941bbc20407736879225fed /src/plist.c | |
parent | 02bd8acd41d1ed7891100fa0057981e98a0dbdad (diff) | |
download | libplist-16f45a04f8790f36e5af939bfd728ee410470e05.tar.gz libplist-16f45a04f8790f36e5af939bfd728ee410470e05.tar.bz2 |
xplist: Plug memory leak when converting PLIST_UID nodes to XML
In node_to_xml nodes of type PLIST_UID are temporarily converted
to a PLIST_DICT for an appropriate XML output. Therefore a PLIST_KEY
and a PLIST_UINT node is created and inserted into the PLIST_DICT
node. Upon completion, the child nodes of the PLIST_DICT node are
detached from the original node and freed, however the data of the
child nodes - the key string and the uint value - are not.
This commit fixes it.
Diffstat (limited to 'src/plist.c')
-rw-r--r-- | src/plist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plist.c b/src/plist.c index d20a252..703ac65 100644 --- a/src/plist.c +++ b/src/plist.c @@ -91,7 +91,7 @@ plist_data_t plist_new_plist_data(void) return data; } -static void plist_free_data(plist_data_t data) +void plist_free_data(plist_data_t data) { if (data) { |