directory: don't leak file handles if we get a corrupt db
This commit is contained in:
parent
28d39948d7
commit
5cc5c37856
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user