Commit c2d6b10c authored by Thomas White's avatar Thomas White
Browse files

Handle the end of the file list cleanly

parent d9a6df9a
...@@ -473,8 +473,13 @@ static void run_work(const struct index_args *iargs, ...@@ -473,8 +473,13 @@ static void run_work(const struct index_args *iargs,
rval = fgets(line, 1023, fh); rval = fgets(line, 1023, fh);
if ( rval == NULL ) { if ( rval == NULL ) {
free(line); free(line);
ERROR("Read error!\n"); if ( feof(fh) ) {
return; allDone = 1;
continue;
} else {
ERROR("Read error!\n");
return;
}
} }
chomp(line); chomp(line);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment