This patch makes cgit properly abort in case the projectsfile cannot
be opened. Without the added return cgit continues using the projects
pointer which is NULL and thus causes a segfault.
if (!projects) {
fprintf(stderr, "Error opening projectsfile %s: %s (%d)\n",
projectsfile, strerror(errno), errno);
if (!projects) {
fprintf(stderr, "Error opening projectsfile %s: %s (%d)\n",
projectsfile, strerror(errno), errno);
}
while (fgets(line, sizeof(line), projects) != NULL) {
for (z = &lastc(line);
}
while (fgets(line, sizeof(line), projects) != NULL) {
for (z = &lastc(line);