[php-src] PR #22339: Fix leak of preserved input string with FILTER_THROW_ON_FAILURE

From: Date: Tue, 16 Jun 2026 21:15:44 +0000
Subject: [php-src] PR #22339: Fix leak of preserved input string with FILTER_THROW_ON_FAILURE
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-36468@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/22339 Author: iliaal php_zval_filter() copies the filtered value to quote it in the FilterFailedException message, then released the copy with zend_string_delref(), which only decrements the refcount. When the input is a non-string scalar that convert_to_string() turns into a fresh heap string, the copy is the sole owner and leaks one string per call, on both the failure and success paths. Use zend_string_release() so it is freed at refcount zero.

« previous php.git-pulls (#36468) next »