add checking validation of fd 27/208527/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 25 Jun 2019 12:25:06 +0000 (21:25 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 25 Jun 2019 12:25:56 +0000 (21:25 +0900)
Change-Id: I83545ed52fab2360f59c45ec0bbe059be08b827f

src/tbm_bufmgr_exynos.c

index beead0b..105ba64 100644 (file)
@@ -2219,7 +2219,8 @@ fail_init_cache_state:
        else
                tbm_drm_helper_unset_fd();
 fail_get_device_name:
-       close(bufmgr_exynos->fd);
+       if (bufmgr_exynos->fd >= 0)
+               close(bufmgr_exynos->fd);
 fail_get_auth_info:
 fail_open_drm:
        free(bufmgr_exynos);