]> granicus.if.org Git - php/commitdiff
fix couple of memory leaks
authorAntony Dovgal <tony2001@php.net>
Tue, 25 May 2004 14:57:56 +0000 (14:57 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 25 May 2004 14:57:56 +0000 (14:57 +0000)
ext/pdo_oci/oci_statement.c

index ba52f38b9f04100123c8d2ecc142eace20091ea6..05a3dfe89c9141baa26ec92fbd594b13d64f7d8a 100755 (executable)
@@ -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) {