X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-log.c;h=fbc58bbcab1a992efb6ee359171d7ed6f0c52ab9;hb=a2a3bf7b2baf0ff64c5b5ffc78d54be82d9967f1;hp=691cf3aef785950132c6be65f8aab39d4b12207e;hpb=f3c5b39567535a41a371aad8a6affbeea0d4c0b9;p=git.git diff --git a/builtin-log.c b/builtin-log.c index 691cf3aef..fbc58bbca 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -101,7 +101,7 @@ static int git_format_config(const char *var, const char *value) if (!strcmp(var, "format.headers")) { int len = strlen(value); extra_headers_size += len + 1; - extra_headers = realloc(extra_headers, extra_headers_size); + extra_headers = xrealloc(extra_headers, extra_headers_size); extra_headers[extra_headers_size - len - 1] = 0; strcat(extra_headers, value); return 0; @@ -381,7 +381,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) continue; nr++; - list = realloc(list, nr * sizeof(list[0])); + list = xrealloc(list, nr * sizeof(list[0])); list[nr - 1] = commit; } total = nr;