[pulseaudio-commits] r1616 - /branches/lennart/src/modules/gconf/module-gconf.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Aug 10 07:49:27 PDT 2007


Author: lennart
Date: Fri Aug 10 16:49:26 2007
New Revision: 1616

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1616&root=3Dpulseaudio&vi=
ew=3Drev
Log:
fix closing of fds in gconf module

Modified:
    branches/lennart/src/modules/gconf/module-gconf.c

Modified: branches/lennart/src/modules/gconf/module-gconf.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/gc=
onf/module-gconf.c?rev=3D1616&root=3Dpulseaudio&r1=3D1615&r2=3D1616&view=3D=
diff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/modules/gconf/module-gconf.c (original)
+++ branches/lennart/src/modules/gconf/module-gconf.c Fri Aug 10 16:49:26 2=
007
@@ -381,14 +381,17 @@
             struct dirent *de;
 =

             while ((de =3D readdir(d))) {
-                char *e;
+                char *e =3D NULL;
                 int fd;
+
+                if (de->d_name[0] =3D=3D '.')
+                    continue;
                 =

                 errno =3D 0;
                 fd =3D strtol(de->d_name, &e, 10);
-                pa_assert(errno =3D=3D 0 && *e =3D=3D 0);
-
-                if (fd >=3D 3)
+                pa_assert(errno =3D=3D 0 && e && *e =3D=3D 0);
+
+                if (fd >=3D 3 && dirfd(d) !=3D fd)
                     close(fd);
             }
             =





More information about the pulseaudio-commits mailing list