Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
libplist.4095
C0001-Plug-memory-leak-when-converting-PLIST_UI...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File C0001-Plug-memory-leak-when-converting-PLIST_UID-nodes-to-XML.patch of Package libplist.4095
From 16f45a04f8790f36e5af939bfd728ee410470e05 Mon Sep 17 00:00:00 2001 From: Nikias Bassen <nikias@gmx.li> Date: Wed, 29 Jun 2016 13:17:00 +0200 Subject: [PATCH] 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. --- src/plist.c | 2 +- src/plist.h | 1 + src/xplist.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) 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) { diff --git a/src/plist.h b/src/plist.h index 822144d..ad65dea 100644 --- a/src/plist.h +++ b/src/plist.h @@ -67,6 +67,7 @@ typedef struct plist_data_s *plist_data_t; plist_t plist_new_node(plist_data_t data); plist_data_t plist_get_data(const plist_t node); plist_data_t plist_new_plist_data(void); +void plist_free_data(plist_data_t data); int plist_data_compare(const void *a, const void *b);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor