Skip to content

Commit b32fad5

Browse 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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/interfaces/ecpg/preproc/output.c

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy