Since the fd is not closed, calling pci_system_init and pci_system_cleanup more than 1024 times results in "too many files open" error.
Signed-off-by: Nithin Nayak Sujir <[email protected]> --- src/common_init.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/common_init.c b/src/common_init.c index 5e91c27..d7ade3f 100644 --- a/src/common_init.c +++ b/src/common_init.c @@ -31,7 +31,9 @@ #include <stdlib.h> #include <errno.h> +#include <unistd.h> +#include "config.h" #include "pciaccess.h" #include "pciaccess_private.h" @@ -122,6 +124,10 @@ pci_system_cleanup( void ) (*pci_sys->methods->destroy)(); } +#ifdef HAVE_MTRR + if (pci_sys->mtrr_fd != -1) + close(pci_sys->mtrr_fd); +#endif free( pci_sys ); pci_sys = NULL; } -- 1.7.1 _______________________________________________ [email protected]: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: [email protected]
