diff options
author | Michael Meskes <meskes@postgresql.org> | 2015-06-12 14:52:55 +0200 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2015-06-13 11:04:58 +0200 |
commit | 4f60d66587f6ed27887d20e3d70da61de5541ab2 (patch) | |
tree | ea763e19ed5d5e1b355530a4530d3760703e0612 /src/interfaces/ecpg/preproc/variable.c | |
parent | 1c150f8aa759aaa9e5761da79653894510d868db (diff) | |
download | postgresql-4f60d66587f6ed27887d20e3d70da61de5541ab2.tar.gz postgresql-4f60d66587f6ed27887d20e3d70da61de5541ab2.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.c | 4 |
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: |