mirror of
https://github.com/postgres/postgres.git
synced 2025-05-12 16:21:30 +03:00
Set connection back to NULL after freeing it.
Patch by Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
This commit is contained in:
parent
976e5844ef
commit
44a36a8d9a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user