mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
Fix memory leak in xmlXIncludeLoadDoc error path
Found by OSS-Fuzz.
This commit is contained in:
parent
a230b728f1
commit
ff009f9913
@ -1608,6 +1608,7 @@ loaded:
|
||||
XML_XINCLUDE_XPTR_RESULT,
|
||||
"XPointer is not a range: #%s\n",
|
||||
fragment);
|
||||
xmlXPathFreeObject(xptr);
|
||||
xmlXPathFreeContext(xptrctxt);
|
||||
xmlFree(URL);
|
||||
xmlFree(fragment);
|
||||
@ -1615,6 +1616,7 @@ loaded:
|
||||
case XPATH_NODESET:
|
||||
if ((xptr->nodesetval == NULL) ||
|
||||
(xptr->nodesetval->nodeNr <= 0)) {
|
||||
xmlXPathFreeObject(xptr);
|
||||
xmlXPathFreeContext(xptrctxt);
|
||||
xmlFree(URL);
|
||||
xmlFree(fragment);
|
||||
|
Loading…
x
Reference in New Issue
Block a user