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:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user