Commit ba578ae6 authored by Bruce Momjian's avatar Bruce Momjian

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

parent 219b4b24
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment