com php-src: pdo_dblib: fix bug #64522DBL IB statement destructor was being called late and clobbered results from subsequent statement object s
sharing the same connection: ext/pdo_dblib/dbli b_stmt.c
| From: | Stanley Sufficool | Date: | Fri, 31 May 2013 04:59:00 +0000 |
| Subject: | com php-src: pdo_dblib: fix bug #64522DBL IB statement destructor was being called late and clobbered results from subsequent statement object s sharing the same connection: ext/pdo_dblib/dbli b_stmt.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72260@lists.php.net to get a copy of this message | ||
Commit: 0074cd2675687a25155cdde2ebc6b9f4a709c743
Author: Stanley Sufficool <ssufficool@php.net> Thu, 30 May 2013 21:59:00 -0700
Parents: e02add77fccbff3930d2abe1734ce34c9e562782
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0074cd2675687a25155cdde2ebc6b9f4a709c743
Log:
pdo_dblib: fix bug #64522DBLIB statement destructor was being called late and clobbered results from
subsequent statement objects sharing the same connection
Bugs:
https://bugs.php.net/64522
Changed paths:
M ext/pdo_dblib/dblib_stmt.c
Diff:
diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c
index 1a2fefd..f806789 100644
--- a/ext/pdo_dblib/dblib_stmt.c
+++ b/ext/pdo_dblib/dblib_stmt.c
@@ -87,7 +87,6 @@ static int dblib_dblib_stmt_cursor_closer(pdo_stmt_t *stmt TSRMLS_DC)
/* Cancel any pending results */
dbcancel(H->link);
-
efree(stmt->columns);
stmt->columns = NULL;
@@ -98,8 +97,6 @@ static int pdo_dblib_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC)
{
pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data;
- dblib_dblib_stmt_cursor_closer(stmt TSRMLS_CC);
-
efree(S);
return 1;
@@ -131,6 +128,8 @@ static int pdo_dblib_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
dbsetuserdata(H->link, (BYTE*) &S->err);
+ dblib_dblib_stmt_cursor_closer(stmt TSRMLS_CC);
+
if (FAIL == dbcmd(H->link, stmt->active_query_string)) {
return 0;
}