Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion fdrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ saveto(struct instance *insp, struct item *itp)
int
read_config_file(const char *fpath, const struct stat *sb, int typeflag)
{
FILE *f;
FILE *f;
char buf[BUFSIZE], save_buf[BUFSIZE], *bp;
int l;
struct item *itp;
Expand Down Expand Up @@ -590,6 +590,7 @@ read_config_file(const char *fpath, const struct stat *sb, int typeflag)
insp = malloc(sizeof(struct instance));
if (insp == NULL) {
perror("malloc");
fclose(f)
return 1;
}
insque(insp, &anchor);
Expand Down Expand Up @@ -637,6 +638,7 @@ read_config_file(const char *fpath, const struct stat *sb, int typeflag)
itp = malloc(sizeof(struct item));
if (itp == NULL) {
perror("malloc");
fclose(f);
exit(EC_MALLOC);
}

Expand Down Expand Up @@ -714,6 +716,7 @@ read_config_file(const char *fpath, const struct stat *sb, int typeflag)
insp->ilast = itp;
}
}
fclose(f);
return 0;
}

Expand Down