summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_statement.c
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2011-01-14 14:57:57 +0000
committerJohannes Schlüter <johannes@php.net>2011-01-14 14:57:57 +0000
commitfc49f76caade8975ed12097f3f10917391e22376 (patch)
tree192f75220cf4a5890502e97a5ce1e88fcdd66664 /ext/pdo_mysql/mysql_statement.c
parenta89c44648868f39629a9373df30c4a1ddcee8ae6 (diff)
downloadphp-git-fc49f76caade8975ed12097f3f10917391e22376.tar.gz
- Fix #53551 (PDOStatement execute segfaults for pdo_mysql driver)
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
-rwxr-xr-xext/pdo_mysql/mysql_statement.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index 85d08f4b50..375e493930 100755
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -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) {