[GIT-PULLS] [php-src] PR #23463: Fix leak of driver_params argument of PDOStatement::bindParam() and bindColumn()

[email protected] (iliaal)
Newsgroups php.git-pulls
Message-ID <[email protected]>
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().
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.