tbm_module: Fix leak of fd 84/280884/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 6 Sep 2022 07:52:11 +0000 (16:52 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 6 Sep 2022 08:00:22 +0000 (17:00 +0900)
Change-Id: I8e2fc72c07bba9035e8cf9f9b6e07d2ac9ff1fcb

src/tbm_module.c

index 6f98691..b03d01a 100644 (file)
@@ -516,6 +516,7 @@ tbm_module_bind_native_display(tbm_module *module, void *native_display)
 
                        if (tbm_drm_helper_is_render_node(fd)) {
                                TBM_INFO("tbm_module has render node.");
+                               close(fd);
                                error = TBM_ERROR_NONE;
                        } else {
                                // make the wayland server socket for sending the authenticated drm_fd to wayland clients.