projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e22166
)
Fix double frees in ecpg.
author
Michael Meskes
Tue, 13 Mar 2018 23:47:49 +0000
(
00:47
+0100)
committer
Michael Meskes
Tue, 13 Mar 2018 23:51:17 +0000
(
00:51
+0100)
Patch by Patrick Krecker
src/interfaces/ecpg/preproc/ecpg.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/preproc/ecpg.c
b/src/interfaces/ecpg/preproc/ecpg.c
index cd770c8b1569531fcceddd204484632f8d57e780..0704837396f7678bb8248d2023e88c4754e379de 100644
(file)
--- a/
src/interfaces/ecpg/preproc/ecpg.c
+++ b/
src/interfaces/ecpg/preproc/ecpg.c
@@
-327,6
+327,7
@@
main(int argc, char *const argv[])
fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
progname, output_filename, strerror(errno));
free(output_filename);
+ output_filename = NULL;
free(input_filename);
continue;
}
@@
-474,8
+475,10
@@
main(int argc, char *const argv[])
}
}
- if (output_filename && out_option == 0)
+ if (output_filename && out_option == 0)
{
free(output_filename);
+ output_filename = NULL;
+ }
free(input_filename);
}