summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/pdo/pdo_dbh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index bb29ae3b2e..34beaf43fd 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -302,6 +302,7 @@ static PHP_METHOD(PDO, dbh_constructor)
/* is the connection still alive ? */
if (pdbh->methods->check_liveness && FAILURE == (pdbh->methods->check_liveness)(pdbh TSRMLS_CC)) {
/* nope... need to kill it */
+ /*??? memory leak */
zend_list_close(le);
pdbh = NULL;
}
@@ -372,6 +373,7 @@ static PHP_METHOD(PDO, dbh_constructor)
le.type = php_pdo_list_entry();
le.ptr = dbh;
+ GC_REFCOUNT(&le) = 1;
if ((zend_hash_str_update_mem(&EG(persistent_list),
(char*)dbh->persistent_id, dbh->persistent_id_len, &le, sizeof(le))) == NULL) {