diff options
Diffstat (limited to '')
-rw-r--r--source/cgit.c2
1 file changed, 1 insertion, 1 deletion
diff --git a/source/cgit.c b/source/cgit.c
index 8dc90e6..2ef4cf1 100644
--- a/source/cgit.c
+++ b/source/cgit.c
@@ -1010,7 +1010,7 @@ static char *guess_defbranch(void)
ref = refs_resolve_ref_unsafe(get_main_ref_store(the_repository), "HEAD", 0, &oid, NULL);
if (!ref || !skip_prefix(ref, "refs/heads/", &refname))
- return "master";
+ return xstrdup("master");
return xstrdup(refname);
}