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
|
void
|
||||||
disconnectdb()
|
disconnectdb()
|
||||||
{
|
{
|
||||||
|
if (res != NULL &&
|
||||||
|
in_result_block == FALSE &&
|
||||||
|
was_get_unset_result == FALSE)
|
||||||
|
PQclear(res);
|
||||||
|
|
||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user