/* if line was fetch completely, string ends with '\n' */
if (! strchr(line, '\n')) {
ulogd_log(ULOGD_ERROR, "line %d too long.\n", linenum);
- return -ERRTOOLONG;
+ err = -ERRTOOLONG;
+ goto cpf_error;
}
if (!(wordend = get_word(line, " \t\n\r[]", (char *) wordbuf)))
}
if (!found) {
- fclose(cfile);
- return -ERRSECTION;
+ err = -ERRSECTION;
+ goto cpf_error;
}
/* Parse this section until next section */
/* if line was fetch completely, string ends with '\n' */
if (! strchr(line, '\n')) {
ulogd_log(ULOGD_ERROR, "line %d too long.\n", linenum);
- return -ERRTOOLONG;
+ err = -ERRTOOLONG;
+ goto cpf_error;
}
if (!(wordend = get_word(line, " =\t\n\r", (char *) &wordbuf)))