php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64522
Patch FIX_BUG_64522 revision 2013-05-31 04:47 UTC by ssufficool@php.net

Patch FIX_BUG_64522 for PDO related Bug #64522

Patch version 2013-05-31 04:47 UTC

Return to Bug #64522 | Download this patch
Patch Revisions:

Developer: ssufficool@php.net

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 Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 28 07:01:27 2024 UTC