X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=builtin-rev-list.c;h=71353eb19db158a60a5ae94f83f53059adc3399b;hb=HEAD;hp=2b298c4e412c4fca24ea5068f17a557f89a6a449;hpb=885a86abe2e9f7b96a4e2012183c6751635840aa;p=git.git diff --git a/builtin-rev-list.c b/builtin-rev-list.c index 2b298c4e..71353eb1 100644 --- a/builtin-rev-list.c +++ b/builtin-rev-list.c @@ -89,6 +89,14 @@ static void show_commit(struct commit *commit) printf("%s%c", pretty_header, hdr_termination); } fflush(stdout); + if (commit->parents) { + free_commit_list(commit->parents); + commit->parents = NULL; + } + if (commit->buffer) { + free(commit->buffer); + commit->buffer = NULL; + } } static struct object_list **process_blob(struct blob *blob,