postgres.git / summary / log / commit / refs

commit    fe65f5931942e6aa7ff0f185cd777eb8d635e3ae
Author:   Michael Meskes <meskes@postgresql.org>
Date:     Mon Mar 12 22:52:08 2018 +0000
First released in: 11.0, 9.3.23, 9.4.18, 9.5.13, 9.6.9, 10.4

    Set connection back to NULL after freeing it.
    
    Patch by Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>


src/interfaces/ecpg/preproc/output.c | 3 +++ 1 file changed, 3 insertions(+) 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 [parent: c32f44c4a5b2]