mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
Fix potential double-free in xmlXPtrStringRangeFunction
Fix double-free in an unlikely error condition. Thanks to Wentao Liang for the report. Fixes #341.
This commit is contained in:
parent
c7dfba9cf4
commit
169f86b7fb
@ -2756,6 +2756,7 @@ xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
||||
*/
|
||||
tmp = xmlXPtrNewLocationSetNodeSet(set->nodesetval);
|
||||
xmlXPathFreeObject(set);
|
||||
set = NULL;
|
||||
if (tmp == NULL) {
|
||||
xmlXPathErr(ctxt, XPATH_MEMORY_ERROR);
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user