]> granicus.if.org Git - php/commitdiff
Fix for Bug #51870
authorAndrey Hristov <andrey@php.net>
Fri, 21 May 2010 11:09:28 +0000 (11:09 +0000)
committerAndrey Hristov <andrey@php.net>
Fri, 21 May 2010 11:09:28 +0000 (11:09 +0000)
PDO::fetchAll after a PDO::execute with bindings lead to a segv.

It is only in unreleased code and thus doesn't deserve a NEWS entry

ext/pdo_mysql/mysql_statement.c

index 22b3474b0faaf4d61e9f6f72137528fd50364bf1..ebfe24447e000cd800a844b958c2a999942186ec 100755 (executable)
@@ -111,7 +111,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
 #endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */
 #if PDO_USE_MYSQLND
        if (!S->stmt && S->current_data) {
-               free(S->current_data);
+               mnd_free(S->current_data);
        }
 #endif /* PDO_USE_MYSQLND */
 
@@ -652,7 +652,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt,
        }
 #if PDO_USE_MYSQLND
        if (!S->stmt && S->current_data) {
-               free(S->current_data);
+               mnd_free(S->current_data);
        }
 #endif /* PDO_USE_MYSQLND */