Commit 33f44db9d0a169493335708daa91d57288f13515

Etienne Samson 2018-01-25T22:17:39

examples: zero out our options memory before use

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/examples/merge.c b/examples/merge.c
index d643971..59982cb 100644
--- a/examples/merge.c
+++ b/examples/merge.c
@@ -46,6 +46,8 @@ static void print_usage(void)
 
 static void merge_options_init(merge_options *opts)
 {
+	memset(opts, 0, sizeof(*opts));
+
 	opts->heads = NULL;
 	opts->heads_count = 0;
 	opts->annotated = NULL;