- Fix #53551 (PDOStatement execute segfaults for pdo_mysql driver)

This commit is contained in:
Johannes Schlüter 2011-01-14 14:57:57 +00:00
parent 6553823c8b
commit 22b42afaee
3 changed files with 78 additions and 2 deletions

View file

@ -142,8 +142,7 @@ static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt TSRMLS_DC)
/* (re)bind the parameters */
if (mysql_stmt_bind_param(S->stmt, S->params) || mysql_stmt_execute(S->stmt)) {
if (S->params) {
efree(S->params);
S->params = 0;
memset(S->params, 0, S->num_params * sizeof(MYSQL_BIND));
}
pdo_mysql_error_stmt(stmt);
if (mysql_stmt_errno(S->stmt) == 2057) {