[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libpciaccess: Changes to 'upstream-unstable'



 configure.ac        |    2 +-
 src/common_vgaarb.c |    9 ++++++++-
 src/linux_sysfs.c   |    4 ++++
 3 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 97d677746cd70ec9eb1f33483cc829a0063953bc
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Sep 25 10:25:56 2009 +1000

    shutup stupid gcc warning, strtok_r ignores the first parameter

diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c
index 6358a66..a96aedf 100644
--- a/src/common_vgaarb.c
+++ b/src/common_vgaarb.c
@@ -42,7 +42,7 @@ static int
 parse_string_to_decodes_rsrc(char *input, int *vga_count, struct pci_slot_match *match)
 {
     char *tok;
-    char *input_sp, *count_sp, *pci_sp;
+    char *input_sp = NULL, *count_sp, *pci_sp;
     char tmp[32];
 
     tok = strtok_r(input,",",&input_sp);

commit 2a10d510d24c7c0aebb03914dd887f9e92cfa754
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Sep 25 10:19:07 2009 +1000

    libpciaccess 0.10.9

diff --git a/configure.ac b/configure.ac
index 05d5b67..f071127 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
 
-AC_INIT(libpciaccess, 0.10.8, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=libpciaccess], libpciaccess)
+AC_INIT(libpciaccess, 0.10.9, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=libpciaccess], libpciaccess)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 

commit 1714046ef08ef685bcf1d6c154e64809b12e8d7f
Author: Tiago Vignatti <tiago.vignatti@nokia.com>
Date:   Fri Sep 18 15:21:19 2009 +0300

    vgaarb: fix newbie typo
    
    Eh, we don't need to check for the fd anyway. Kudos jcristau for reporting.
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>

diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c
index f1c71e0..6358a66 100644
--- a/src/common_vgaarb.c
+++ b/src/common_vgaarb.c
@@ -153,9 +153,6 @@ pci_device_vgaarb_fini(void)
     if (!pci_sys)
         return;
 
-    if (!pci_sys->vgaarb_fd)
-        return;
-
     close(pci_sys->vgaarb_fd);
 }
 

commit 13c7e6c8f100882718f995f5bf1d478a012cdbdd
Author: Tiago Vignatti <tiago.vignatti@nokia.com>
Date:   Wed Sep 16 12:56:53 2009 +0300

    vgaarb: check for fd before close it
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>

diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c
index ca5c0a7..f1c71e0 100644
--- a/src/common_vgaarb.c
+++ b/src/common_vgaarb.c
@@ -150,6 +150,12 @@ pci_device_vgaarb_init(void)
 void
 pci_device_vgaarb_fini(void)
 {
+    if (!pci_sys)
+        return;
+
+    if (!pci_sys->vgaarb_fd)
+        return;
+
     close(pci_sys->vgaarb_fd);
 }
 

commit cdbdfaf61c05d0d18eae6815b10666f93162148f
Author: Keith Packard <keithp@keithp.com>
Date:   Thu Sep 17 17:38:56 2009 -0700

    Free return value from scandir instead of leaking it.
    
    Scandir is defined to return pointers to malloc'd storage, so make
    sure that memory is nicely freed.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
index 02fbd13..85095b3 100644
--- a/src/linux_sysfs.c
+++ b/src/linux_sysfs.c
@@ -213,6 +213,10 @@ populate_entries( struct pci_system * p )
 	}
     }
 
+    for (i = 0; i < n; i++)
+	free(devices[i]);
+    free(devices);
+
     if (err) {
 	free(p->devices);
 	p->devices = NULL;

commit 42b879a203c1c16daa9d0c610c6a217ead7a5829
Author: Dave Airlie <airlied@linux.ie>
Date:   Wed Sep 2 19:03:11 2009 +1000

    vgaarb: check pci_sys exists before initing vga arb

diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c
index a40b064..ca5c0a7 100644
--- a/src/common_vgaarb.c
+++ b/src/common_vgaarb.c
@@ -124,6 +124,10 @@ pci_device_vgaarb_init(void)
     struct pci_slot_match match;
     char buf[BUFSIZE];
     int ret, rsrc;
+
+    if (!pci_sys)
+        return -1;
+
     if ((pci_sys->vgaarb_fd = open ("/dev/vga_arbiter", O_RDWR)) < 0) {
         return errno;
     }


Reply to: