diff options
author | David Kilzer <ddkilzer@apple.com> | 2022-04-06 18:05:20 -0700 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-04-20 19:12:44 +0200 |
commit | d2f48e211567454177e8a288782c3598d33995eb (patch) | |
tree | 544aa25d055ed3876023c9059cdaf9daffe951b2 | |
parent | 0febec8b066a65ef7c70a989314b36495396e4a5 (diff) | |
download | libxml2-d2f48e211567454177e8a288782c3598d33995eb.tar.gz |
Fix leak of xmlElementContent
* valid.c:
(xmlCopyDocElementContent):
- Set `tmp->parent` properly to fix a leak that occurs in
xmlFreeDocElementContent().
- Appears to be a regresion from cee2b3a5f1.
Found by OSS-Fuzz Issue 44509.
-rw-r--r-- | valid.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1052,6 +1052,7 @@ xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) { tmp->type = cur->type; tmp->ocur = cur->ocur; prev->c2 = tmp; + tmp->parent = prev; if (cur->name != NULL) { if (dict) tmp->name = xmlDictLookup(dict, cur->name, -1); |