[Mesa-dev] [Bug 54106] New: Fix a memory leak in dri2_terminate()

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Aug 27 00:25:48 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=54106

             Bug #: 54106
           Summary: Fix a memory leak in dri2_terminate()
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev at lists.freedesktop.org
        ReportedBy: homer.xing at intel.com


dri2_dpy->driver_name is malloc in dri2_connect but forgot to release.

This patch fix the memory leak.

commit 4f56dedfd6e5093a1ee291af6867c1371b7ae8fd
Author: Homer Hsing <homer.xing at intel.com>
Date:   Mon Aug 27 15:21:41 2012 +0800

    Fix a memory leak in dri2_terminate()

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 7326b85..cfd1cc5 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -613,6 +613,8 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
       dlclose(dri2_dpy->driver);
    if (dri2_dpy->device_name)
       free(dri2_dpy->device_name);
+   if (dri2_dpy->driver_name)
+      free(dri2_dpy->driver_name);

    if (disp->PlatformDisplay == NULL) {
       switch (disp->Platform) {

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list