summaryrefslogtreecommitdiffstats
path: root/src/modules/gconf/module-gconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/gconf/module-gconf.c')
-rw-r--r--src/modules/gconf/module-gconf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/gconf/module-gconf.c b/src/modules/gconf/module-gconf.c
index 7e932c11..24f60b1e 100644
--- a/src/modules/gconf/module-gconf.c
+++ b/src/modules/gconf/module-gconf.c
@@ -381,14 +381,17 @@ static int start_client(const char *n, pid_t *pid) {
struct dirent *de;
while ((de = readdir(d))) {
- char *e;
+ char *e = NULL;
int fd;
+
+ if (de->d_name[0] == '.')
+ continue;
errno = 0;
fd = strtol(de->d_name, &e, 10);
- pa_assert(errno == 0 && *e == 0);
+ pa_assert(errno == 0 && e && *e == 0);
- if (fd >= 3)
+ if (fd >= 3 && dirfd(d) != fd)
close(fd);
}