[php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6

From: Date: Thu, 29 Oct 2026 19:07:27 +0000
Subject: [php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142960@lists.php.net to get a copy of this message
Author: Ilia Alshanetsky (iliaal) Date: 2026-10-29T14:48:57-04:00 Commit: https://github.com/php/php-src/commit/4fbeee21f778477cac6b2eeac27895cd473f41a1 Raw diff: https://github.com/php/php-src/commit/4fbeee21f778477cac6b2eeac27895cd473f41a1.diff Merge branch 'PHP-8.5' into PHP-8.6 * PHP-8.5: ext/standard: Free Windows DNS query results Changed paths: M NEWS M ext/standard/dns_win32.c Diff: diff --git a/NEWS b/NEWS index edc5baa549b4..eb3909ab0001 100644 --- a/NEWS +++ b/NEWS @@ -138,6 +138,8 @@ PHP NEWS properties). (Lazizbek Ergashev) - Standard: + . Fixed memory leaks in checkdnsrr() and dns_check_record() on Windows. + (Ilia Alshanetsky) . Fixed bug GH-24308 (Request shutdown calls closelog() even when syslog was not opened by PHP). (lazerg) . Fixed bug GH-24552 (Case-insensitive substr_compare(), ksort() and diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index c9ff67e47b1e..e8e970e0d229 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -114,6 +114,10 @@ PHP_FUNCTION(dns_check_record) status = DnsQuery_A(hostname, type, DNS_QUERY_STANDARD, NULL, &pResult, NULL); + if (!status) { + DnsRecordListFree(pResult, DnsFreeRecordListDeep); + } + RETURN_BOOL(!status); } /* }}} */

« previous php.cvs (#142960) next »