mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
fix closing of fds in gconf module
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1616 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
ffa1708070
commit
357c0e415f
1 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue