mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix crash in PDO_ODBC statement dtor (#17586)
This commit is contained in:
commit
a7df6a7759
1 changed files with 5 additions and 1 deletions
|
@ -136,7 +136,11 @@ static int odbc_stmt_dtor(pdo_stmt_t *stmt)
|
|||
{
|
||||
pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data;
|
||||
|
||||
if (S->stmt != SQL_NULL_HANDLE) {
|
||||
// TODO: Factor this out; pg/mysql/firebird do the same thing
|
||||
bool server_obj_usable = !Z_ISUNDEF(stmt->database_object_handle)
|
||||
&& IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)])
|
||||
&& !(OBJ_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED);
|
||||
if (S->stmt != SQL_NULL_HANDLE && server_obj_usable) {
|
||||
if (stmt->executed) {
|
||||
SQLCloseCursor(S->stmt);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue