]> granicus.if.org Git - php/commitdiff
More leak fixes.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 25 May 2004 16:38:28 +0000 (16:38 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 25 May 2004 16:38:28 +0000 (16:38 +0000)
ext/pdo/pdo_dbh.c
ext/pdo/pdo_stmt.c

index 83c1ee4ebaa238d68995c13448cd86a71abb0d54..62a6357e48b20b0cefdcf9dcbca67a4db117e279 100755 (executable)
@@ -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 {
index 86fa24f98450e6f48c37dcc052573a8ea4934eaa..21163a6926f881f5b4a136068eb00b0cd176149a 100755 (executable)
@@ -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