From: Ilia Alshanetsky Date: Sat, 24 Dec 2005 17:41:04 +0000 (+0000) Subject: Fixed memory corruption that affected pdo_sqlite2. X-Git-Tag: php-5.1.2RC2~83 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e507633151b45ecb2f3ce66652b24e6f237c9e5;p=php Fixed memory corruption that affected pdo_sqlite2. --- 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); }