mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.3'
* PHP-8.3: Fix GH-12974: Apache crashes on shutdown when using pg_pconnect()
This commit is contained in:
@@ -168,7 +168,13 @@ static void _close_odbc_conn(zend_resource *rsrc)
|
||||
SQLFreeEnv(conn->henv);
|
||||
}
|
||||
efree(conn);
|
||||
ODBCG(num_links)--;
|
||||
/* See https://github.com/php/php-src/issues/12974 why we need to check the if */
|
||||
#ifdef ZTS
|
||||
if (odbc_module_entry.module_started)
|
||||
#endif
|
||||
{
|
||||
ODBCG(num_links)--;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -315,8 +315,14 @@ static void _close_pgsql_plink(zend_resource *rsrc)
|
||||
PQclear(res);
|
||||
}
|
||||
PQfinish(link);
|
||||
PGG(num_persistent)--;
|
||||
PGG(num_links)--;
|
||||
/* See https://github.com/php/php-src/issues/12974 why we need to check the if */
|
||||
#ifdef ZTS
|
||||
if (pgsql_module_entry.module_started)
|
||||
#endif
|
||||
{
|
||||
PGG(num_persistent)--;
|
||||
PGG(num_links)--;
|
||||
}
|
||||
rsrc->ptr = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user