projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
219b4b2
)
Free libpgeasy result structure on database close; fixed memory leak.
author
Bruce Momjian
Thu, 13 Dec 2001 09:40:18 +0000
(09:40 +0000)
committer
Bruce Momjian
Thu, 13 Dec 2001 09:40:18 +0000
(09:40 +0000)
src/interfaces/libpgeasy/libpgeasy.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/libpgeasy/libpgeasy.c
b/src/interfaces/libpgeasy/libpgeasy.c
index 0f049d6262d546a3b0e33eed4fdd68d756f2487f..b1d1104f3b0f964d71a6fce057d989eaec735a39 100644
(file)
--- a/
src/interfaces/libpgeasy/libpgeasy.c
+++ b/
src/interfaces/libpgeasy/libpgeasy.c
@@
-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);
}