Cleanup libxml_get_external_entity_loader() (#12893)

We can directly put the value into return_value instead of copying
things around.
This commit is contained in:
Niels Dossche 2023-12-08 17:44:46 +00:00 committed by GitHub
parent 90d41cccfd
commit 90eb5679d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1213,10 +1213,7 @@ PHP_FUNCTION(libxml_get_external_entity_loader)
ZEND_PARSE_PARAMETERS_NONE();
if (ZEND_FCC_INITIALIZED(LIBXML(entity_loader_callback))) {
zval tmp;
zend_get_callable_zval_from_fcc(&LIBXML(entity_loader_callback), &tmp);
RETVAL_COPY(&tmp);
zval_ptr_dtor(&tmp);
zend_get_callable_zval_from_fcc(&LIBXML(entity_loader_callback), return_value);
return;
}
RETURN_NULL();