Skip to content

Commit 39267c8

Browse files
committed
Merge branch 'ss/submodule--helper-use-xmalloc'
Code clean-up. * ss/submodule--helper-use-xmalloc: submodule--helper: replace malloc with xmalloc
2 parents 80595ab + 35f220b commit 39267c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/submodule--helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ static void submodule_summary_callback(struct diff_queue_struct *q,
11601160

11611161
if (!S_ISGITLINK(p->one->mode) && !S_ISGITLINK(p->two->mode))
11621162
continue;
1163-
temp = (struct module_cb*)malloc(sizeof(struct module_cb));
1163+
temp = xmalloc(sizeof(*temp));
11641164
temp->mod_src = p->one->mode;
11651165
temp->mod_dst = p->two->mode;
11661166
temp->oid_src = p->one->oid;

0 commit comments

Comments
 (0)