summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2018-03-12 23:52:08 +0100
committerMichael Meskes <meskes@postgresql.org>2018-03-12 23:53:39 +0100
commit44a36a8d9a6e7ba209253d694dd2ebf3e13f0b5d (patch)
treee56b2f14f58bb74d679f4567db91d26b32f0e214 /src
parent976e5844ef53ee2e777a4725ae20db1392887098 (diff)
Set connection back to NULL after freeing it.
Patch by Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/preproc/output.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c
index 59d5d30df4a..93a1ad1498d 100644
--- a/src/interfaces/ecpg/preproc/output.c
+++ b/src/interfaces/ecpg/preproc/output.c
@@ -155,6 +155,7 @@ output_statement(char *stmt, int whenever_mode, enum ECPG_statement_type st)
free(stmt);
if (connection != NULL)
free(connection);
+ connection = NULL;
}
void
@@ -169,6 +170,7 @@ output_prepare_statement(char *name, char *stmt)
free(name);
if (connection != NULL)
free(connection);
+ connection = NULL;
}
void
@@ -189,6 +191,7 @@ output_deallocate_prepare_statement(char *name)
free(name);
if (connection != NULL)
free(connection);
+ connection = NULL;
}
static void