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);
}