Fix prevent issues 89/45889/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 20 Jul 2015 08:22:44 +0000 (17:22 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 12 Aug 2015 07:54:37 +0000 (16:54 +0900)
Change-Id: Id1d21cd0f75121115f99b9cc4f3188b55e502dbf

src/tbm_surface_internal.c

index 8c9ddb7..d4eb022 100755 (executable)
@@ -434,9 +434,10 @@ tbm_surface_internal_create_with_flags (int width, int height, int format, int f
             {
                 _deinit_surface_bufmgr ();
                 LIST_DELINIT (&g_surface_list);
-                _tbm_surface_mutex_unlock();
-                return NULL;
             }
+
+            _tbm_surface_mutex_unlock();
+            return NULL;
         }
     }
 
@@ -660,6 +661,8 @@ tbm_surface_internal_get_info (tbm_surface_h surface, int opt, tbm_surface_info_
 
     _tbm_surface_mutex_lock();
 
+    memset (bo_handles, 0, sizeof(tbm_bo_handle) * 4);
+
     surf = (struct _tbm_surface *)surface;
 
     info->width = surf->info.width;