e_linux_dmabuf: fix memory leak 16/308716/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 29 Mar 2024 06:48:20 +0000 (15:48 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 29 Mar 2024 06:58:50 +0000 (15:58 +0900)
Change-Id: Ia76c97e82b7e9d9f2a3bc911eeb1c80c4f5853cf

src/bin/e_linux_dmabuf.c

index 8e36d0f..e4da906 100644 (file)
@@ -214,6 +214,7 @@ e_linux_dmabuf_init(struct wl_display *display)
    if (!dmabuf->supported_formats)
      {
         ERR("fail to _e_linux_dmabuf_supported_format_get");
+        free(dmabuf);
         return EINA_FALSE;
      }
 
@@ -222,6 +223,7 @@ e_linux_dmabuf_init(struct wl_display *display)
    if (!dmabuf->ds_dmabuf)
      {
         ERR("Could not create ds_linux_dmabuf_v1");
+        free(dmabuf->supported_formats);
         free(dmabuf);
         return EINA_FALSE;
      }