Commit 5cc5c378 authored by Eric Wong's avatar Eric Wong Committed by Max Kellermann

directory: don't leak file handles if we get a corrupt db

parent 28d39948
...@@ -1052,7 +1052,7 @@ int readDirectoryDB(void) ...@@ -1052,7 +1052,7 @@ int readDirectoryDB(void)
} else { } else {
ERROR("db info not found in db file\n"); ERROR("db info not found in db file\n");
ERROR("you should recreate the db using --create-db\n"); ERROR("you should recreate the db using --create-db\n");
fseek(fp, 0, SEEK_SET); while (fclose(fp) && errno == EINTR) ;
return -1; return -1;
} }
} }
......
Markdown is supported
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