summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/lib/ecpglib.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>1999-04-16 12:26:49 +0000
committerMichael Meskes <meskes@postgresql.org>1999-04-16 12:26:49 +0000
commitad5a54d1707dabe723ac0e9b6b05fc2a324b3f04 (patch)
tree79456dcc3f65c8348af3379079a331d2304d55c2 /src/interfaces/ecpg/lib/ecpglib.c
parent075dc252c7b887f1f5871b2c96d8f6ddf869bda2 (diff)
*** empty log message ***
Diffstat (limited to 'src/interfaces/ecpg/lib/ecpglib.c')
-rw-r--r--src/interfaces/ecpg/lib/ecpglib.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/interfaces/ecpg/lib/ecpglib.c b/src/interfaces/ecpg/lib/ecpglib.c
index 9fea350eb71..5314a0a90d3 100644
--- a/src/interfaces/ecpg/lib/ecpglib.c
+++ b/src/interfaces/ecpg/lib/ecpglib.c
@@ -149,26 +149,21 @@ ECPGfinish(struct connection * act)
PQfinish(act->connection);
/* remove act from the list */
if (act == all_connections)
- {
all_connections = act->next;
- free(act->name);
- free(act);
- }
else
{
struct connection *con;
for (con = all_connections; con->next && con->next != act; con = con->next);
if (con->next)
- {
con->next = act->next;
- free(act->name);
- free(act);
- }
}
if (actual_connection == act)
actual_connection = all_connections;
+
+ free(act->name);
+ free(act);
}
else
ECPGlog("ECPGfinish: called an extra time.\n");