Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ba578ae

Browse files
committed
Free libpgeasy result structure on database close; fixed memory leak.
1 parent 219b4b2 commit ba578ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/interfaces/libpgeasy/libpgeasy.c

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ connectdb(char *options)
6262
void
6363
disconnectdb()
6464
{
65+
if (res != NULL &&
66+
in_result_block == FALSE &&
67+
was_get_unset_result == FALSE)
68+
PQclear(res);
69+
6570
PQfinish(conn);
6671
}
6772

0 commit comments

Comments
 (0)