From: Antony Dovgal Date: Tue, 25 May 2004 14:57:56 +0000 (+0000) Subject: fix couple of memory leaks X-Git-Tag: php-5.0.0RC3RC1~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=737bc357cb3e9d38e1d8b9cfcd3249fd4a79a6e4;p=php fix couple of memory leaks --- 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) {