Leak introduced in initial commit
71320ed6, v4.3.10.
read_schedule(char *fname, time_t sched[], int n, time_t t0, time_t anchor)
{
FILE *fp;
read_schedule(char *fname, time_t sched[], int n, time_t t0, time_t anchor)
{
FILE *fp;
char buf[1024];
char *endp;
char buf[1024];
char *endp;
sched[0] = 0;
while (fgets(buf, sizeof(buf), fp) != NULL) {
++lno;
endp = strchr(buf, '#');
if (endp)
*endp = 0;
sched[0] = 0;
while (fgets(buf, sizeof(buf), fp) != NULL) {
++lno;
endp = strchr(buf, '#');
if (endp)
*endp = 0;
- if (parse_schedule_line(buf, sched, n, t0, &anchor, fname, lno))
- return -1;
+ if (parse_schedule_line(buf, sched, n, t0, &anchor, fname, lno)) {
+ ret = -1;
+ break;
+ }