ecore_wl2: Remove second _buffer_manager_destroy() call 60/288360/2 accepted/tizen/unified/20230223.162159
authorHubert Stachowiak <h.stachowiak@samsung.com>
Wed, 15 Feb 2023 13:28:52 +0000 (14:28 +0100)
committerChun <jykeon@samsung.com>
Thu, 23 Feb 2023 01:39:50 +0000 (01:39 +0000)
_ecore_wl2_buffer_partial_create function will call _buffer_manager_destroy() when returning NULL. Second _buffer_manager_destoroy() call in _ecore_wl2_buffer_test function is unnecessary.

Change-Id: Id6b13cbdfafd47834b3c1fd4f5914094c1e26727

src/lib/ecore_wl2/ecore_wl2_buffer.c

index 789af2b..26665b1 100644 (file)
@@ -867,8 +867,13 @@ _ecore_wl2_buffer_test(Ecore_Wl2_Display *ewd)
    if (!ecore_wl2_buffer_init(ewd, ECORE_WL2_BUFFER_DMABUF)) return;
 
    buf = _ecore_wl2_buffer_partial_create(1, 1, EINA_TRUE);
-   if (!buf) goto fail;
-
+   //TIZEN_ONLY(20230215) ecore_wl2: Remove second _buffer_manager_destroy() call
+   if (!buf)
+     {
+        ewd->wl.dmabuf = NULL;
+        return;
+     }
+   //
    dp = zwp_linux_dmabuf_v1_create_params(ewd->wl.dmabuf);
    zwp_linux_buffer_params_v1_add(dp, buf->fd, 0, 0, buf->stride, 0, 0);
    zwp_linux_buffer_params_v1_add_listener(dp, &params_listener, ewd);
@@ -876,10 +881,4 @@ _ecore_wl2_buffer_test(Ecore_Wl2_Display *ewd)
                                      DRM_FORMAT_ARGB8888, 0);
 
    ecore_wl2_buffer_destroy(buf);
-
-   return;
-
-fail:
-  _buffer_manager_destroy();
-  ewd->wl.dmabuf = NULL;
 }