[Mesa-dev] [PATCH] ilo: destroy the mutex, if winsys creation fails

Emil Velikov emil.l.velikov at gmail.com
Thu May 8 11:09:39 PDT 2014


Cc: Chia-I Wu <olvaffe at gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/winsys/intel/drm/intel_drm_winsys.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/winsys/intel/drm/intel_drm_winsys.c b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
index d34246a..00c4a46 100644
--- a/src/gallium/winsys/intel/drm/intel_drm_winsys.c
+++ b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
@@ -181,6 +181,7 @@ intel_winsys_create_for_fd(int fd)
    pipe_mutex_init(winsys->mutex);
 
    if (!probe_winsys(winsys)) {
+      pipe_mutex_destroy(winsys->mutex);
       drm_intel_bufmgr_destroy(winsys->bufmgr);
       FREE(winsys);
       return NULL;
-- 
1.9.2



More information about the mesa-dev mailing list