MFB: Fixed memory leaks when working with cursors in PDO PostgreSQL driver.

This commit is contained in:
Ilia Alshanetsky 2006-05-08 14:33:23 +00:00
parent 154507f6bc
commit 889f66837c
2 changed files with 4 additions and 0 deletions

View file

@ -241,6 +241,7 @@ static int pgsql_stmt_fetch(pdo_stmt_t *stmt,
spprintf(&q, 0, "FETCH %s %ld FROM %s", ori_str, offset, S->cursor_name);
S->result = PQexec(S->H->server, q);
efree(q);
status = PQresultStatus(S->result);
if (status != PGRES_COMMAND_OK && status != PGRES_TUPLES_OK) {