projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
925581d
)
Set connection back to NULL after freeing it.
author
Michael Meskes
<
[email protected]
>
Mon, 12 Mar 2018 22:52:08 +0000
(23:52 +0100)
committer
Michael Meskes
<
[email protected]
>
Mon, 12 Mar 2018 22:54:29 +0000
(23:54 +0100)
Patch by Jeevan Ladhe <
[email protected]
>
src/interfaces/ecpg/preproc/output.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/preproc/output.c
b/src/interfaces/ecpg/preproc/output.c
index fffcda7cde9fa1a3a7177efc5402bcb8f1a08495..bfa64a17cedf62510689854a78eb302e1047b75c 100644
(file)
--- 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