Skip to content

Commit 90eb567

Browse files
authored
Cleanup libxml_get_external_entity_loader() (#12893)
We can directly put the value into return_value instead of copying things around.
1 parent 90d41cc commit 90eb567

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ext/libxml/libxml.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,10 +1213,7 @@ PHP_FUNCTION(libxml_get_external_entity_loader)
12131213
ZEND_PARSE_PARAMETERS_NONE();
12141214

12151215
if (ZEND_FCC_INITIALIZED(LIBXML(entity_loader_callback))) {
1216-
zval tmp;
1217-
zend_get_callable_zval_from_fcc(&LIBXML(entity_loader_callback), &tmp);
1218-
RETVAL_COPY(&tmp);
1219-
zval_ptr_dtor(&tmp);
1216+
zend_get_callable_zval_from_fcc(&LIBXML(entity_loader_callback), return_value);
12201217
return;
12211218
}
12221219
RETURN_NULL();

0 commit comments

Comments
 (0)