From 7855c52e8141169fcf7e6b79418f6898608c3eca Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Mon, 5 May 2025 13:58:15 +0100 Subject: [PATCH] ext/standard: gethostbyaddr/gethostbyname using *NEW_STR flavor. (#18502) --- ext/standard/dns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 04477129e35..bd5720210fd 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -163,7 +163,7 @@ PHP_FUNCTION(gethostbyaddr) #endif RETVAL_FALSE; } else { - RETVAL_STR(hostname); + RETVAL_NEW_STR(hostname); } } /* }}} */ @@ -236,7 +236,7 @@ PHP_FUNCTION(gethostbyname) php_error_docref(NULL, E_WARNING, "Host name to ip failed %s", hostname); RETURN_STRINGL(hostname, hostname_len); } else { - RETURN_STR(ipaddr); + RETURN_NEW_STR(ipaddr); } } /* }}} */