From b7ecaca17f83201e0209424d8c2551e123433d2d Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 25 May 2004 16:38:28 +0000 Subject: [PATCH] More leak fixes. --- ext/pdo/pdo_dbh.c | 1 + ext/pdo/pdo_stmt.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 83c1ee4eba..62a6357e48 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -97,6 +97,7 @@ void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC) php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", message); if (info) { + zval_dtor(info); FREE_ZVAL(info); } } else { diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 86fa24f984..21163a6926 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -808,6 +808,15 @@ void pdo_dbstmt_free_storage(zend_object *object TSRMLS_DC) } efree(stmt->columns); } + + if (stmt->bound_params) { + zend_hash_destroy(stmt->bound_params); + FREE_HASHTABLE(stmt->bound_params); + } + if (stmt->bound_columns) { + zend_hash_destroy(stmt->bound_columns); + FREE_HASHTABLE(stmt->bound_columns); + } zend_objects_store_del_ref(&stmt->database_object_handle TSRMLS_CC); #if 0 -- 2.50.1