diff options
author | Keyur <kgovande@etsy.com> | 2016-08-08 23:34:00 +0000 |
---|---|---|
committer | Keyur <kgovande@etsy.com> | 2016-08-09 00:16:46 +0000 |
commit | 3f25c4228a8f505a000c1ea5751062606247349a (patch) | |
tree | 05caf1efdb75d6704da598e1de007e391420bf40 /ext/pdo/pdo_dbh.c | |
parent | be77ce37fd3290365a359f7143cc636d66f14cf1 (diff) | |
download | php-git-3f25c4228a8f505a000c1ea5751062606247349a.tar.gz |
Fix bug 72788: Invalid memory access when database_object_handle
is undefined. Also fix memory leak in dbh_free when using persistent
PDO connections.
Diffstat (limited to 'ext/pdo/pdo_dbh.c')
-rw-r--r-- | ext/pdo/pdo_dbh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 2fb5334a9d..8a7c1d3931 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1503,15 +1503,15 @@ static void dbh_free(pdo_dbh_t *dbh, zend_bool free_persistent) { int i; - if (dbh->is_persistent && !free_persistent) { - return; - } - if (dbh->query_stmt) { zval_ptr_dtor(&dbh->query_stmt_zval); dbh->query_stmt = NULL; } + if (dbh->is_persistent && !free_persistent) { + return; + } + if (dbh->methods) { dbh->methods->closer(dbh); } |