Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
6a38f512
Commit
6a38f512
authored
May 18, 2014
by
Nikias Bassen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bplist: Fix memory leaking caused by unused nodes in plist_from_bin()
parent
df053ccd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
bplist.c
src/bplist.c
+9
-0
No files found.
src/bplist.c
View file @
6a38f512
...
...
@@ -715,6 +715,15 @@ void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist)
}
*
plist
=
nodeslist
[
root_object
];
// free unreferenced nodes that would otherwise leak memory
for
(
i
=
0
;
i
<
num_objects
;
i
++
)
{
if
(
i
==
root_object
)
continue
;
node_t
*
node
=
(
node_t
*
)
nodeslist
[
i
];
if
(
NODE_IS_ROOT
(
node
))
{
plist_free
(
node
);
}
}
free
(
nodeslist
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment