git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e22166)
Fix double frees in ecpg.
2018年3月13日 23:47:49 +0000 (00:47 +0100)
2018年3月13日 23:51:17 +0000 (00:51 +0100)
Patch by Patrick Krecker <patrick@judicata.com>


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);
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /