return info->match;
}
+static void free_refmatch_inner(struct refmatch *info)
+{
+ if (info->first_ref)
+ free(info->first_ref);
+}
+
static char *find_default_branch(struct cgit_repo *repo)
{
struct refmatch info;
ref = info.first_ref;
if (ref)
ref = xstrdup(ref);
+ free_refmatch_inner(&info);
+
return ref;
}