From 2e507633151b45ecb2f3ce66652b24e6f237c9e5 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 24 Dec 2005 17:41:04 +0000 Subject: [PATCH] Fixed memory corruption that affected pdo_sqlite2. --- ext/pdo/pdo_dbh.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index e3f811d0da..19042f8ca9 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1344,6 +1344,11 @@ static void dbh_free(pdo_dbh_t *dbh TSRMLS_DC) if (--dbh->refcount) return; + if (dbh->query_stmt) { + zval_dtor(&dbh->query_stmt_zval); + dbh->query_stmt = NULL; + } + if (dbh->methods) { dbh->methods->closer(dbh TSRMLS_CC); } -- 2.50.1