From 737bc357cb3e9d38e1d8b9cfcd3249fd4a79a6e4 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 25 May 2004 14:57:56 +0000 Subject: [PATCH] fix couple of memory leaks --- ext/pdo_oci/oci_statement.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c index ba52f38b9f..05a3dfe89c 100755 --- a/ext/pdo_oci/oci_statement.c +++ b/ext/pdo_oci/oci_statement.c @@ -48,6 +48,9 @@ static int oci_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) { pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data; + HashTable *BC = stmt->bound_columns; + HashTable *BP = stmt->bound_params; + int i; if (S->stmt) { @@ -64,6 +67,16 @@ static int oci_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) S->err = NULL; } + if (BC) { + zend_hash_destroy(BC); + efree(stmt->bound_columns); + } + + if (BP) { + zend_hash_destroy(BP); + efree(stmt->bound_params); + } + if (S->cols) { for (i = 0; i < stmt->column_count; i++) { if (S->cols[i].data) { -- 2.50.1