deinit bufmgr after creating a tbm surface 41/65541/2 accepted/tizen/common/20160414.142611 accepted/tizen/ivi/20160415.014816 accepted/tizen/mobile/20160415.014836 accepted/tizen/tv/20160415.014734 accepted/tizen/wearable/20160415.014756 submit/tizen/20160414.040521
authorBoram Park <boram1288.park@samsung.com>
Fri, 8 Apr 2016 09:43:56 +0000 (18:43 +0900)
committerBoram Park <boram1288.park@samsung.com>
Thu, 14 Apr 2016 02:23:28 +0000 (19:23 -0700)
Change-Id: I6b66902b0968cdd665c40db8d5c4cc033893b6fb

src/lib/ecore_drm/ecore_drm_display.c

index b064e18..d0c3e08 100644 (file)
@@ -289,12 +289,10 @@ ecore_drm_display_fb_hal_buffer_create(Ecore_Drm_Fb *fb)
 
    bufmgr = tbm_bufmgr_init(dev->drm.fd);
    EINA_SAFETY_ON_NULL_RETURN_VAL(bufmgr, EINA_FALSE);
-
    bo = tbm_bo_import(bufmgr, arg.name);
-   tbm_bufmgr_deinit(bufmgr);
-
    if (!bo)
      {
+        tbm_bufmgr_deinit(bufmgr);
         ERR("Cannot import (%d)", arg.name);
         return EINA_FALSE;
      }
@@ -310,11 +308,12 @@ ecore_drm_display_fb_hal_buffer_create(Ecore_Drm_Fb *fb)
      {
         ERR("Cannot create hal_buffer");
         tbm_bo_unref(bo);
+        tbm_bufmgr_deinit(bufmgr);
         return EINA_FALSE;
      }
 
    tbm_bo_unref(bo);
-
+   tbm_bufmgr_deinit(bufmgr);
    return EINA_TRUE;
 }