1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-25 21:42:33 +03:00

Set connection back to NULL after freeing it.

Patch by Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
This commit is contained in:
Michael Meskes 2018-03-12 23:52:08 +01:00
parent 17bb625017
commit b32fad52e9

View File

@ -158,6 +158,7 @@ output_statement(char *stmt, int whenever_mode, enum ECPG_statement_type st)
free(stmt);
if (connection != NULL)
free(connection);
connection = NULL;
}
void
@ -172,6 +173,7 @@ output_prepare_statement(char *name, char *stmt)
free(name);
if (connection != NULL)
free(connection);
connection = NULL;
}
void
@ -192,6 +194,7 @@ output_deallocate_prepare_statement(char *name)
free(name);
if (connection != NULL)
free(connection);
connection = NULL;
}
static void