Commit: 0074cd2675687a25155cdde2ebc6b9f4a709c743 Author: Stanley Sufficool <ssuffic...@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; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php