aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/variable.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2015-06-12 14:52:55 +0200
committerMichael Meskes <meskes@postgresql.org>2015-06-12 14:52:55 +0200
commit96ad72d1c00fa6526eb4d5e9c2a747b44752b4ee (patch)
tree255e0cc9a4611ee572c58b8bab4e8616b3b31f7a /src/interfaces/ecpg/preproc/variable.c
parent82be1bf5099c0f6d1ef482ba3ca9cf1741db1eb3 (diff)
downloadpostgresql-96ad72d1c00fa6526eb4d5e9c2a747b44752b4ee.tar.gz
postgresql-96ad72d1c00fa6526eb4d5e9c2a747b44752b4ee.zip
Fixed some memory leaks in ECPG.
Patch by Michael Paquier
Diffstat (limited to 'src/interfaces/ecpg/preproc/variable.c')
-rw-r--r--src/interfaces/ecpg/preproc/variable.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c
index 2ad7b5d255e..bb4b664b859 100644
--- a/src/interfaces/ecpg/preproc/variable.c
+++ b/src/interfaces/ecpg/preproc/variable.c
@@ -437,11 +437,13 @@ remove_variable_from_list(struct arguments ** list, struct variable * var)
void
dump_variables(struct arguments * list, int mode)
{
- char *str_zero = mm_strdup("0");
+ char *str_zero;
if (list == NULL)
return;
+ str_zero = mm_strdup("0");
+
/*
* The list is build up from the beginning so lets first dump the end of
* the list: