diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-10-16 19:00:12 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-10-16 19:00:12 +0300 |
commit | 8bfe748fb0f58dfb21cbd1018e2e78457d354de1 (patch) | |
tree | 83084eb0bd4cd7c376b6b3a7d48c228abd1d1ae8 /ext/pdo | |
parent | 999fe36d404a375864202a1b2d90de111ddd1b25 (diff) | |
download | php-git-8bfe748fb0f58dfb21cbd1018e2e78457d354de1.tar.gz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index c2c65650c1..a2c8092478 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2025,7 +2025,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; |