summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-11-10 15:31:49 +0100
committerJo-Philipp Wich <jo@mein.io>2020-11-10 15:31:49 +0100
commit2ad1eb5296daea031aa0765caeb86f25c527120a (patch)
tree198000bf4da3fc6a0a7525cbe8afff3819270ee6
parent0e1b863228ad05774a390493087b3901fa82b31b (diff)
main: fix double free when using multiple -E options
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index 78d218f..49fb2cc 100644
--- a/main.c
+++ b/main.c
@@ -364,6 +364,8 @@ main(int argc, char **argv)
fclose(envfile);
+ envfile = NULL;
+
if (!o) {
fprintf(stderr, "Option -%c must point to a valid JSON object\n", opt);
rv = 1;