summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/pgsql_driver.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-07-09 04:54:04 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-07-09 04:54:04 +0000
commit858d8277903a9cf6582a83a6ff4ebd16b51d4930 (patch)
treed1aa0f25bb6a27a9a36b815dc818dac087d0610a /ext/pdo_pgsql/pgsql_driver.c
parentdf60983b753df88b58e52931ae78508255abf298 (diff)
downloadphp-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.c2
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: