Fixed bug #42643 (CLI segfaults if using ATTR_PERSISTENT).

This commit is contained in:
Ilia Alshanetsky 2007-09-12 18:26:49 +00:00
parent 96df4d2161
commit 910850be51
2 changed files with 7 additions and 6 deletions

1
NEWS
View File

@ -15,6 +15,7 @@
Reported by Laurent gaffie. (Ilia)
- Fixed imagerectangle regression with 1x1 rectangle (libgd #106). (Pierre)
- Fixed bug #42643 (CLI segfaults if using ATTR_PERSISTENT). (Ilia)
- Fixed bug #42627 (bz2 extension fails to build with -fno-common).
(dolecek at netbsd dot org)
- Fixed Bug #42596 (session.save_path MODE option does not work). (Ilia)

View File

@ -1453,12 +1453,6 @@ static void dbh_free(pdo_dbh_t *dbh TSRMLS_DC)
}
}
if (dbh->properties) {
zend_hash_destroy(dbh->properties);
efree(dbh->properties);
dbh->properties = NULL;
}
pefree(dbh, dbh->is_persistent);
}
@ -1478,6 +1472,12 @@ static void pdo_dbh_free_storage(pdo_dbh_t *dbh TSRMLS_DC)
dbh->methods->rollback(dbh TSRMLS_CC);
dbh->in_txn = 0;
}
if (dbh->properties) {
zend_hash_destroy(dbh->properties);
efree(dbh->properties);
dbh->properties = NULL;
}
if (!dbh->is_persistent) {
dbh_free(dbh TSRMLS_CC);