diff options
author | David Kilzer <ddkilzer@apple.com> | 2022-04-06 18:05:20 -0700 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-04-07 12:02:02 +0000 |
commit | b7e8e4c7f7ddb6a962e5fa406e774301bc713be7 (patch) | |
tree | 2723a20a3ef046b61ec5cb6db9e9e926d8325b66 /valid.c | |
parent | 94ac5e61f399759a5463c0505099222ed8f13a82 (diff) | |
download | libxml2-b7e8e4c7f7ddb6a962e5fa406e774301bc713be7.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.
Diffstat (limited to 'valid.c')
-rw-r--r-- | valid.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1039,6 +1039,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); |