summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2005-07-08 15:25:15 +0000
committerWez Furlong <wez@php.net>2005-07-08 15:25:15 +0000
commit8f31f0cfaae6f944fb4d0823d2d71d830f139973 (patch)
tree0afcded575adeb9d28efb95e1b41482d534974ff
parent206c7b8372ce32c2f2236a9286523eeb3236e2ba (diff)
downloadphp-git-8f31f0cfaae6f944fb4d0823d2d71d830f139973.tar.gz
Fix a shutdown order issue I saw in the pgsql driver. Hope this doesn't mess
up something in the OCI driver; I think I've been here before.
-rwxr-xr-xext/pdo/pdo_stmt.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 4676395f0b..4f765ffa20 100755
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -1838,6 +1838,19 @@ static void free_statement(pdo_stmt_t *stmt TSRMLS_DC)
stmt->properties = NULL;
}
+ if (stmt->bound_params) {
+ zend_hash_destroy(stmt->bound_params);
+ FREE_HASHTABLE(stmt->bound_params);
+ }
+ if (stmt->bound_param_map) {
+ zend_hash_destroy(stmt->bound_param_map);
+ FREE_HASHTABLE(stmt->bound_param_map);
+ }
+ if (stmt->bound_columns) {
+ zend_hash_destroy(stmt->bound_columns);
+ FREE_HASHTABLE(stmt->bound_columns);
+ }
+
if (stmt->methods && stmt->methods->dtor) {
stmt->methods->dtor(stmt TSRMLS_CC);
}
@@ -1855,18 +1868,6 @@ static void free_statement(pdo_stmt_t *stmt TSRMLS_DC)
efree(stmt->columns);
}
- if (stmt->bound_params) {
- zend_hash_destroy(stmt->bound_params);
- FREE_HASHTABLE(stmt->bound_params);
- }
- if (stmt->bound_param_map) {
- zend_hash_destroy(stmt->bound_param_map);
- FREE_HASHTABLE(stmt->bound_param_map);
- }
- if (stmt->bound_columns) {
- zend_hash_destroy(stmt->bound_columns);
- FREE_HASHTABLE(stmt->bound_columns);
- }
do_fetch_opt_finish(stmt, 1 TSRMLS_CC);