aboutsummaryrefslogtreecommitdiff
path: root/fsck-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'fsck-objects.c')
-rw-r--r--fsck-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fsck-objects.c b/fsck-objects.c
index 24286de15..4d994f3fc 100644
--- a/fsck-objects.c
+++ b/fsck-objects.c
@@ -458,7 +458,7 @@ static void fsck_object_dir(const char *path)
static int fsck_head_link(void)
{
unsigned char sha1[20];
- const char *git_HEAD = strdup(git_path("HEAD"));
+ const char *git_HEAD = xstrdup(git_path("HEAD"));
const char *git_refs_heads_master = resolve_ref(git_HEAD, sha1, 1);
int pfxlen = strlen(git_HEAD) - 4; /* strip .../.git/ part */