mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Move dtor before memory freed to avoid invalid read
This commit is contained in:
parent
56e3ec93a9
commit
b29ad29b91
1 changed files with 1 additions and 1 deletions
|
@ -83,6 +83,7 @@ static int dblib_handle_closer(pdo_dbh_t *dbh)
|
|||
pdo_dblib_db_handle *H = (pdo_dblib_db_handle *)dbh->driver_data;
|
||||
|
||||
if (H) {
|
||||
pdo_dblib_err_dtor(&H->err);
|
||||
if (H->link) {
|
||||
dbclose(H->link);
|
||||
H->link = NULL;
|
||||
|
@ -93,7 +94,6 @@ static int dblib_handle_closer(pdo_dbh_t *dbh)
|
|||
}
|
||||
pefree(H, dbh->is_persistent);
|
||||
dbh->driver_data = NULL;
|
||||
pdo_dblib_err_dtor(&H->err);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue