xserver: Branch 'master' - 3 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 2 01:54:38 UTC 2019


 hw/dmx/glxProxy/glxcmds.c             |    3 +++
 hw/xfree86/os-support/linux/lnx_agp.c |    1 +
 hw/xwin/glx/indirect.c                |    4 +++-
 3 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 71cff63c06a6b494dc8921270535f33fb78bd32b
Author: Adam Richter <adamrichter4 at gmail.com>
Date:   Wed May 1 15:22:15 2019 -0700

    hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a couple of error branches, per complaints from cppcheck.

diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 330d5c4ad..6e64811ce 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -285,10 +285,13 @@ CreateContext(__GLXclientState * cl,
     num_be_screens = to_screen - from_screen + 1;
     glxc->real_ids = xallocarray(num_be_screens, sizeof(XID));
     if (!glxc->real_ids) {
+        free(glxc);
         return BadAlloc;
     }
     glxc->real_vids = xallocarray(num_be_screens, sizeof(XID));
     if (!glxc->real_vids) {
+        free(glxc->real_ids);
+        free(glxc);
         return BadAlloc;
     }
 
commit b6eb8cf03f5850d13ec21101ec1783a444aefcab
Author: Adam Richter <adamrichter4 at gmail.com>
Date:   Wed May 1 15:22:02 2019 -0700

    hw/xfree86/os-support/linux/lnx_agp.c xf86GetAGPInfo(): free(info) in an error path, caught by cppcheck.

diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c
index e47bbfa1a..3aec5397c 100644
--- a/hw/xfree86/os-support/linux/lnx_agp.c
+++ b/hw/xfree86/os-support/linux/lnx_agp.c
@@ -143,6 +143,7 @@ xf86GetAGPInfo(int screenNum)
         xf86DrvMsg(screenNum, X_ERROR,
                    "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n",
                    strerror(errno));
+        free(info);
         return NULL;
     }
 
commit 99904a3a7b10f8a8314e7ab6b8c4af41cb445693
Author: Adam Richter <adamrichter4 at gmail.com>
Date:   Wed May 1 15:21:48 2019 -0700

    hw/xwin/glx/indirect.c glxWinScreenProbe(): Add free(screen) that was missing from an error path.  Caught by cppcheck.

diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index f429bf06d..c336663b0 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -502,8 +502,10 @@ glxWinScreenProbe(ScreenPtr pScreen)
         return NULL;
 
     // Select the native GL implementation (WGL)
-    if (glWinSelectImplementation(1))
+    if (glWinSelectImplementation(1)) {
+        free(screen);
         return NULL;
+    }
 
     // create window class
 #define WIN_GL_TEST_WINDOW_CLASS "XWinGLTest"


More information about the xorg-commit mailing list