diff options
author | Xinchen Hui <laruence@php.net> | 2014-06-24 00:03:02 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2014-06-24 00:03:02 +0800 |
commit | ee30cc8a1e016bce8a2828d7755dfb7540a5a40c (patch) | |
tree | 8934efc98ea897a5b158c5d0380ace1a1b509d88 | |
parent | 587923ccc837fc22901f3114631bcc3b1b384fcd (diff) | |
download | php-git-ee30cc8a1e016bce8a2828d7755dfb7540a5a40c.tar.gz |
Fixed use of uninitialized value
-rw-r--r-- | ext/pdo/pdo_dbh.c | 2 |
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) { |