- 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 a89c446488
commit fc49f76caa
2 changed files with 74 additions and 2 deletions

View file

@ -136,8 +136,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) {