aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/connect.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2006-11-08 10:46:47 +0000
committerMichael Meskes <meskes@postgresql.org>2006-11-08 10:46:47 +0000
commit0c96e42797dbe2918c909209abbaee4d2c985e38 (patch)
tree8dd29cf5498674b1266b52d3c9f658916bd97f5f /src/interfaces/ecpg/ecpglib/connect.c
parent415b925345ef99adaab31af89787a2c0814fcffa (diff)
downloadpostgresql-0c96e42797dbe2918c909209abbaee4d2c985e38.tar.gz
postgresql-0c96e42797dbe2918c909209abbaee4d2c985e38.zip
Applied patch by Peter Harris to free auto_mem structure on connect
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/connect.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/connect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c
index 9636c91a363..374264cee09 100644
--- a/src/interfaces/ecpg/ecpglib/connect.c
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.36 2006/10/04 00:30:11 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.37 2006/11/08 10:46:47 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -277,6 +277,9 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
ECPGinit_sqlca(sqlca);
+ /* clear auto_mem structure because some error handling functions might access it */
+ ECPGclear_auto_mem();
+
if (INFORMIX_MODE(compat))
{
char *envname;