ilo: destroy the mutex, if winsys creation fails
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 8 May 2014 18:09:39 +0000 (19:09 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 10 May 2014 01:09:02 +0000 (02:09 +0100)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
src/gallium/winsys/intel/drm/intel_drm_winsys.c

index d34246af9ebe3a259882a020fbd230b96bfe5219..00c4a46c21435f4b1e9cefdb7f58a27bb9147c46 100644 (file)
@@ -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;