Merge branch 'ss/submodule--helper-use-xmalloc' into jch

Code clean-up.

* ss/submodule--helper-use-xmalloc:
  submodule--helper: replace malloc with xmalloc
This commit is contained in:
Junio C Hamano
2026-03-11 17:23:14 -07:00

View File

@@ -1161,7 +1161,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;