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@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) {
Hi, any comment ?
This patch fixes leak on platforms where driver_name is allocated. However at least with swrast backend and android this would fail as they do not allocate memory but point to a static string.
this bug got fixed: --- 8< --------------------------- commit 5cb1cad0aef8d1c426207c955996278290e19e60 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Mon Jun 2 12:26:17 2014 +0100 egl/dri2: do not leak dri2_dpy->driver_name
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.