]> git.ipfire.org Git - thirdparty/git.git/blobdiff - range-diff.c
use CALLOC_ARRAY
[thirdparty/git.git] / range-diff.c
index a3cc7c94a3d5c881a0eb9037a06c1a7cf8803bbd..116fb0735c6f4908b126d8471c9a8a52be9ccc21 100644 (file)
@@ -96,7 +96,7 @@ static int read_patches(const char *range, struct string_list *list,
                                string_list_append(list, buf.buf)->util = util;
                                strbuf_reset(&buf);
                        }
-                       util = xcalloc(sizeof(*util), 1);
+                       CALLOC_ARRAY(util, 1);
                        if (get_oid(p, &util->oid)) {
                                error(_("could not parse commit '%s'"), p);
                                free(util);