diff options
author | Xinchen Hui <laruence@php.net> | 2013-06-16 22:55:59 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2013-06-16 22:55:59 +0800 |
commit | 49e57a31659a82443b9413127f8d58a72f09ed5b (patch) | |
tree | a9cea182326026b5c523d30fc9b3490d3000e19f /ext/pdo | |
parent | 7457867ba8c46e276d2bcb6e47766a9f5abb0c79 (diff) | |
download | php-git-49e57a31659a82443b9413127f8d58a72f09ed5b.tar.gz |
Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to the same db server)
Diffstat (limited to 'ext/pdo')
-rw-r--r-- | ext/pdo/pdo_dbh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index e6265f5807..25db6842f6 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -338,6 +338,9 @@ static PHP_METHOD(PDO, dbh_constructor) if (pdbh->std.properties) { zend_hash_destroy(dbh->std.properties); efree(dbh->std.properties); + if (dbh->std.properties_table) { + efree(dbh->std.properties_table); + } } else { pdbh->std.ce = dbh->std.ce; pdbh->def_stmt_ce = dbh->def_stmt_ce; @@ -1575,6 +1578,7 @@ static void pdo_dbh_free_storage(pdo_dbh_t *dbh TSRMLS_DC) } zend_object_std_dtor(&dbh->std TSRMLS_CC); dbh->std.properties = NULL; + dbh->std.properties_table = NULL; dbh_free(dbh TSRMLS_CC); } |