From 5cc5c378560acb0629fff40053e948eb071c0885 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 23 Sep 2008 22:37:40 +0200 Subject: [PATCH] directory: don't leak file handles if we get a corrupt db --- src/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directory.c b/src/directory.c index 52f9cb48b..a3efdf15e 100644 --- a/src/directory.c +++ b/src/directory.c @@ -1052,7 +1052,7 @@ int readDirectoryDB(void) } else { ERROR("db info not found in db file\n"); ERROR("you should recreate the db using --create-db\n"); - fseek(fp, 0, SEEK_SET); + while (fclose(fp) && errno == EINTR) ; return -1; } }