From 858d8277903a9cf6582a83a6ff4ebd16b51d4930 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 9 Jul 2005 04:54:04 +0000 Subject: Added cursor closer handler. Fixed memory leak. --- ext/pdo_pgsql/pgsql_driver.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/pdo_pgsql/pgsql_driver.c') 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: -- cgit v1.2.1