mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: pgsql: Fix memory leak when first string conversion fails
This commit is contained in:
@@ -1225,15 +1225,13 @@ PHP_FUNCTION(pg_query)
|
||||
|
||||
static void _php_pgsql_free_params(char **params, int num_params)
|
||||
{
|
||||
if (num_params > 0) {
|
||||
int i;
|
||||
for (i = 0; i < num_params; i++) {
|
||||
if (params[i]) {
|
||||
efree(params[i]);
|
||||
}
|
||||
int i;
|
||||
for (i = 0; i < num_params; i++) {
|
||||
if (params[i]) {
|
||||
efree(params[i]);
|
||||
}
|
||||
efree(params);
|
||||
}
|
||||
efree(params);
|
||||
}
|
||||
|
||||
/* Execute a query */
|
||||
|
||||
Reference in New Issue
Block a user