aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-19 09:54:56 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-19 09:54:57 -0700
commit39267c8a7ec1a14b4da89f6ee8ed1cf179535183 (patch)
tree6b62eb6e506d8560d463737e574e1892607a6980 /builtin
parent80595ab08ef501aef6d9b55856cdc9b092ed6e12 (diff)
parent35f220b639849d43cd8aaae34ccbe38e9935ab2b (diff)
downloadgit-39267c8a7ec1a14b4da89f6ee8ed1cf179535183.tar.xz
Merge branch 'ss/submodule--helper-use-xmalloc'
Code clean-up. * ss/submodule--helper-use-xmalloc: submodule--helper: replace malloc with xmalloc
Diffstat (limited to 'builtin')
-rw-r--r--builtin/submodule--helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 143f7cb3cc..f3e132888f 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1160,7 +1160,7 @@ static void submodule_summary_callback(struct diff_queue_struct *q,
if (!S_ISGITLINK(p->one->mode) && !S_ISGITLINK(p->two->mode))
continue;
- temp = (struct module_cb*)malloc(sizeof(struct module_cb));
+ temp = xmalloc(sizeof(*temp));
temp->mod_src = p->one->mode;
temp->mod_dst = p->two->mode;
temp->oid_src = p->one->oid;