summaryrefslogtreecommitdiff
path: root/builtin/blame.c
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2020-10-11 18:03:37 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-10-12 12:25:14 -0700
commitdb7d07f61057e94e2a3683ca10d67a2a219f542f (patch)
treeff44066f9388f3ed228af7513e61cb9017b25dc5 /builtin/blame.c
parentgrep: handle deref_tag() returning NULL (diff)
downloadtgif-db7d07f61057e94e2a3683ca10d67a2a219f542f.tar.xz
blame: handle deref_tag() returning NULL
Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/blame.c')
-rw-r--r--builtin/blame.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index bb0f29300e..b5036ab327 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -820,6 +820,8 @@ static int peel_to_commit_oid(struct object_id *oid_ret, void *cbdata)
if (kind != OBJ_TAG)
return -1;
obj = deref_tag(r, parse_object(r, &oid), NULL, 0);
+ if (!obj)
+ return -1;
oidcpy(&oid, &obj->oid);
}
}