From: Changyeon Lee Date: Tue, 25 Jun 2019 12:25:06 +0000 (+0900) Subject: add checking validation of fd X-Git-Tag: accepted/tizen/unified/20191104.115205~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F27%2F208527%2F1;p=platform%2Fadaptation%2Fsamsung_exynos%2Flibtbm-exynos.git add checking validation of fd Change-Id: I83545ed52fab2360f59c45ec0bbe059be08b827f --- diff --git a/src/tbm_bufmgr_exynos.c b/src/tbm_bufmgr_exynos.c index beead0b..105ba64 100644 --- a/src/tbm_bufmgr_exynos.c +++ b/src/tbm_bufmgr_exynos.c @@ -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);