Skip to content

Commit 232953b

Browse files
committed
Merge branch 'rs/fast-import-simplify-mempool-allocation' into maint-2.43
Code simplification. * rs/fast-import-simplify-mempool-allocation: fast-import: use mem_pool_calloc()
2 parents 0f7a10a + 5b7eec4 commit 232953b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

builtin/fast-import.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2809,8 +2809,7 @@ static void parse_new_tag(const char *arg)
28092809
enum object_type type;
28102810
const char *v;
28112811

2812-
t = mem_pool_alloc(&fi_mem_pool, sizeof(struct tag));
2813-
memset(t, 0, sizeof(struct tag));
2812+
t = mem_pool_calloc(&fi_mem_pool, 1, sizeof(struct tag));
28142813
t->name = mem_pool_strdup(&fi_mem_pool, arg);
28152814
if (last_tag)
28162815
last_tag->next_tag = t;

0 commit comments

Comments
 (0)