From 90eb5679d2a06e098bace50d1ae5278a25f1ff87 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:44:46 +0000 Subject: [PATCH] Cleanup libxml_get_external_entity_loader() (#12893) We can directly put the value into return_value instead of copying things around. --- ext/libxml/libxml.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index a7942ccabe2..c29e4544235 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -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();