1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3'

* PHP-8.3:
  Fix potential memory leak in XPath evaluation results
This commit is contained in:
Niels Dossche
2024-03-14 21:13:14 +01:00

View File

@@ -365,7 +365,9 @@ static zval *php_dom_xpath_callback_fetch_args(xmlXPathParserContextPtr ctxt, ui
}
break;
default:
ZVAL_STRING(param, (char *)xmlXPathCastToString(obj));
char *str = (char *)xmlXPathCastToString(obj);
ZVAL_STRING(param, str);
xmlFree(str);
break;
}
xmlXPathFreeObject(obj);