[php-src] PR #23850: ext/curl: Free the pushed handle when the push callback denies or throws
| From: | iliaal | Date: | Tue, 22 Sep 2026 14:35:16 +0000 |
| Subject: | [php-src] PR #23850: ext/curl: Free the pushed handle when the push callback denies or throws | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38723@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23850
Author: iliaal
When the callback denies the push, or throws and leaves the return value undefined, libcurl destroys
the easy handle itself, but the wrapper kept a stale ch->cp and never released the CurlHandle it
had just created, so each denied push leaked one wrapper and permanently bumped the parent's
clone counter. The per-instance teardown moves out of curl_free_obj() into
_php_curl_free_instance(), reused for the denied handle with ch->cp cleared first so the object
dtor takes its constructor-failure exit rather than cleaning up twice. The new test needs Caddy, so
it only runs in the lanes that have it.