diff options
author | Michael Meskes <meskes@postgresql.org> | 2018-03-12 23:52:08 +0100 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2018-03-13 16:23:25 +0100 |
commit | fe65f5931942e6aa7ff0f185cd777eb8d635e3ae (patch) | |
tree | 79285adb2e13503d347a9967b4850513cfdd1819 | |
parent | c32f44c4a5b27f5055600db1a7374a898f3681df (diff) | |
download | postgresql-fe65f5931942e6aa7ff0f185cd777eb8d635e3ae.tar.gz postgresql-fe65f5931942e6aa7ff0f185cd777eb8d635e3ae.zip |
Set connection back to NULL after freeing it.
Patch by Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
-rw-r--r-- | src/interfaces/ecpg/preproc/output.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c index 0479c93c991..ee00d367caa 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 |