From b646e35f974f5a6fc16d2802eb6b0725127748d6 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 7 Dec 2023 20:37:16 +0100 Subject: [PATCH] Cleanup libxml_get_external_entity_loader() 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 a7942ccabe29e..c29e454423568 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();