diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-09 10:50:10 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-09 10:50:10 +0200 |
commit | 66caca53ce4127f9a8a01e12e32f5387c5e1b8d3 (patch) | |
tree | f8462efe0f8dab0a1b385b18cd775bb6603d7bbb /ext/pdo_pgsql | |
parent | 645b0372e3cdf65f060d749ad4f6dfdd7e0252fb (diff) | |
download | php-git-66caca53ce4127f9a8a01e12e32f5387c5e1b8d3.tar.gz |
Fix PDO pgsql memory leak with scrollable cursors
Diffstat (limited to 'ext/pdo_pgsql')
-rw-r--r-- | ext/pdo_pgsql/pgsql_statement.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index a07c8117ca..d830d57c18 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -149,7 +149,7 @@ static int pgsql_stmt_execute(pdo_stmt_t *stmt) if (S->is_prepared) { spprintf(&q, 0, "CLOSE %s", S->cursor_name); - S->result = PQexec(H->server, q); + PQclear(PQexec(H->server, q)); efree(q); } |