Univention Bugzilla – Attachment #4476: [v2] Close file descriptor for bug #27729
if ((fp = fopen(filename, "r")) == NULL)
return NULL;
if (fgets(line, 1024, fp) == NULL)
if (fgets(line, 1024, fp) == NULL) {
fclose(fp);
}
len = strlen(line);
if (!len)
if (line[len-1] == '\n')
line[len-1] = '\0';