mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-17 19:30:00 +08:00
Free libpgeasy result structure on database close; fixed memory leak.
This commit is contained in:
parent
219b4b2490
commit
ba578ae667
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user