From: Martin Koegler Date: Mon, 18 Feb 2008 20:47:57 +0000 (+0100) Subject: check results of parse_commit in merge_bases X-Git-Tag: v1.5.5-rc0~93^2~16 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=172947e645a6c919efb78a246c919d0daaa674f0;p=git.git check results of parse_commit in merge_bases An error is signaled by returning NULL. Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- diff --git a/commit.c b/commit.c index 8b8fb04d1..70f12664c 100644 --- a/commit.c +++ b/commit.c @@ -552,8 +552,10 @@ static struct commit_list *merge_bases(struct commit *one, struct commit *two) */ return commit_list_insert(one, &result); - parse_commit(one); - parse_commit(two); + if (parse_commit(one)) + return NULL; + if (parse_commit(two)) + return NULL; one->object.flags |= PARENT1; two->object.flags |= PARENT2; @@ -586,7 +588,8 @@ static struct commit_list *merge_bases(struct commit *one, struct commit *two) parents = parents->next; if ((p->object.flags & flags) == flags) continue; - parse_commit(p); + if (parse_commit(p)) + return NULL; p->object.flags |= flags; insert_by_date(p, &list); }