1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Free libpgeasy result structure on database close; fixed memory leak.

This commit is contained in:
Bruce Momjian
2001-12-13 09:40:18 +00:00
parent 219b4b2490
commit ba578ae667

View File

@ -62,6 +62,11 @@ connectdb(char *options)
void
disconnectdb()
{
if (res != NULL &&
in_result_block == FALSE &&
was_get_unset_result == FALSE)
PQclear(res);
PQfinish(conn);
}