summaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/connections.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index 594a5b8950..f616dd0508 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -327,9 +327,10 @@ cannot create read-only descriptor for \"%s\"; no mmap"),
/* We do not need the file name anymore after we
opened another file descriptor in read-only mode. */
- if (fd != -1 && dbs[cnt].shared)
+ if (fd != -1)
{
- ro_fd = open (fname, O_RDONLY);
+ if (dbs[cnt].shared)
+ ro_fd = open (fname, O_RDONLY);
unlink (fname);
}