Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b32fad5

Browse filesBrowse files
author
Michael Meskes
committed
Set connection back to NULL after freeing it.
Patch by Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
1 parent 17bb625 commit b32fad5
Copy full SHA for b32fad5

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎src/interfaces/ecpg/preproc/output.c

Copy file name to clipboardExpand all lines: src/interfaces/ecpg/preproc/output.c
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ output_statement(char *stmt, int whenever_mode, enum ECPG_statement_type st)
158158
free(stmt);
159159
if (connection != NULL)
160160
free(connection);
161+
connection = NULL;
161162
}
162163

163164
void
@@ -172,6 +173,7 @@ output_prepare_statement(char *name, char *stmt)
172173
free(name);
173174
if (connection != NULL)
174175
free(connection);
176+
connection = NULL;
175177
}
176178

177179
void
@@ -192,6 +194,7 @@ output_deallocate_prepare_statement(char *name)
192194
free(name);
193195
if (connection != NULL)
194196
free(connection);
197+
connection = NULL;
195198
}
196199

197200
static void

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.