X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=commit-reach.c;fp=commit-reach.c;h=bfa1b6454dc3245a7a587f08b6e5f739bb63d912;hb=e67431d4965d13b185db3ddb4445c3c7034ca62d;hp=ecc913fc99ba9e6b88df675462a2b8f912cbd0ce;hpb=f41f85c9ec8d4d46de0fd5fded88db94d3ec8c11;p=thirdparty%2Fgit.git diff --git a/commit-reach.c b/commit-reach.c index ecc913fc99..bfa1b6454d 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -104,8 +104,11 @@ static struct commit_list *paint_down_to_common(struct repository *r, parents = parents->next; if ((p->object.flags & flags) == flags) continue; - if (repo_parse_commit(r, p)) + if (repo_parse_commit(r, p)) { + clear_prio_queue(&queue); + free_commit_list(result); return NULL; + } p->object.flags |= flags; prio_queue_put(&queue, p); }