summaryrefslogtreecommitdiff
path: root/ext/pdo
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-10-16 19:02:07 +0300
committerDmitry Stogov <dmitry@zend.com>2017-10-16 19:02:07 +0300
commitc33ca443eefead6d9db29ca534c6f5b87cc31f1e (patch)
treee42a37077966a0ce6b1f9496ad534e793bc95051 /ext/pdo
parent200d526a9c1708e3d586f85f5e7d93062385aa8a (diff)
parent8bfe748fb0f58dfb21cbd1018e2e78457d354de1 (diff)
downloadphp-git-c33ca443eefead6d9db29ca534c6f5b87cc31f1e.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Prevent crash on ext/pdo_mysql/tests/bug_39858.phpt when built with libmysql
Diffstat (limited to 'ext/pdo')
-rw-r--r--ext/pdo/pdo_stmt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index b953739a6a..70cb4ff7c8 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -2019,7 +2019,9 @@ static int pdo_stmt_do_next_rowset(pdo_stmt_t *stmt)
struct pdo_column_data *cols = stmt->columns;
for (i = 0; i < stmt->column_count; i++) {
- zend_string_release(cols[i].name);
+ if (cols[i].name) {
+ zend_string_release(cols[i].name);
+ }
}
efree(stmt->columns);
stmt->columns = NULL;