Skip to content

Commit 33f44db

Browse files
committed
examples: zero out our options memory before use
1 parent fb79d7d commit 33f44db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/merge.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ static void print_usage(void)
4646

4747
static void merge_options_init(merge_options *opts)
4848
{
49+
memset(opts, 0, sizeof(*opts));
50+
4951
opts->heads = NULL;
5052
opts->heads_count = 0;
5153
opts->annotated = NULL;

0 commit comments

Comments
 (0)