X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=show-index.c;h=63f9da53237d4233bede66a28e4bcf27d5b44af1;hb=50c94032844bb184cdeff7779be3b6a23e04d312;hp=4c0ac138aff7b5add73e17fc9c3c4e409fd918e2;hpb=6d1cdadbeeb03f40250526e29b1f1a91582911d8;p=git.git diff --git a/show-index.c b/show-index.c index 4c0ac138a..63f9da532 100644 --- a/show-index.c +++ b/show-index.c @@ -48,7 +48,7 @@ int main(int argc, char **argv) unsigned char sha1[20]; uint32_t crc; uint32_t off; - } *entries = malloc(nr * sizeof(entries[0])); + } *entries = xmalloc(nr * sizeof(entries[0])); for (i = 0; i < nr; i++) if (fread(entries[i].sha1, 20, 1, stdin) != 1) die("unable to read sha1 %u/%u", i, nr);