diff options
Diffstat (limited to 'src/interfaces/ecpg/lib/ecpglib.c')
-rw-r--r-- | src/interfaces/ecpg/lib/ecpglib.c | 11 |
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"); |