[php-src] PR #23463: Fix leak of driver_params argument of PDOStatement::bindParam() and bindColumn()
| From: | iliaal | Date: | Tue, 25 Aug 2026 23:10:39 +0000 |
| Subject: | [php-src] PR #23463: Fix leak of driver_params argument of PDOStatement::bindParam() and bindColumn() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38144@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23463
Author: iliaal
PDOStatement::bindParam() and bindColumn() leak references on the driver_params argument:
register_bound_param() never releases its transient copy, and really_register_bound_param() drops
its hash-bound reference on neither of its two early failure returns, so 200k failing bindParam()
calls grow memory by about 128MB and even successful calls leak one reference each. Both paths now
release what they take; the EVT_ALLOC hook failure needed no change because deleting the hash entry
frees it through param_dtor().