diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-07-09 04:54:04 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-07-09 04:54:04 +0000 |
commit | 858d8277903a9cf6582a83a6ff4ebd16b51d4930 (patch) | |
tree | d1aa0f25bb6a27a9a36b815dc818dac087d0610a /ext/pdo_pgsql/pgsql_driver.c | |
parent | df60983b753df88b58e52931ae78508255abf298 (diff) | |
download | php-git-858d8277903a9cf6582a83a6ff4ebd16b51d4930.tar.gz |
Added cursor closer handler.
Fixed memory leak.
Diffstat (limited to 'ext/pdo_pgsql/pgsql_driver.c')
-rw-r--r-- | ext/pdo_pgsql/pgsql_driver.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 4594da8b1a..038b0e99c7 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -184,6 +184,7 @@ static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, case PGRES_COMMAND_OK: case PGRES_TUPLES_OK: /* it worked */ + PQclear(res); return 1; case PGRES_BAD_RESPONSE: @@ -191,6 +192,7 @@ static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, * PDO emulate it */ efree(S->stmt_name); S->stmt_name = NULL; + PQclear(res); break; default: |