fix null dereference
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 19 Mar 2021 03:00:01 +0000 (12:00 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 16 Feb 2023 10:12:24 +0000 (19:12 +0900)
Change-Id: Id9961fd6d504fd389059b6b9739b33de3b2ed7af

src/wayland-client.c

index 4304e9f..e65c4c9 100644 (file)
@@ -1015,9 +1015,11 @@ wl_proxy_marshal_array_flags(struct wl_proxy *proxy, uint32_t opcode,
                // TIZEN_ONLY(20210310) : wayland-client : do not abort when there is an EBADF error on marshalling request
                if (errno == EBADF) {
                        wl_log("fail wl_closure_marshal with EBADF");
-                       new_proxy->flags |= WL_PROXY_FLAG_ID_DELETED;
-                       proxy_destroy(new_proxy);
-                       new_proxy = NULL;
+                       if (new_proxy) {
+                               new_proxy->flags |= WL_PROXY_FLAG_ID_DELETED;
+                               proxy_destroy(new_proxy);
+                               new_proxy = NULL;
+                       }
                        goto err_unlock;
                }
                // TIZEN_ONLY : END