From: Junkyeong Kim Date: Mon, 18 Apr 2016 07:00:43 +0000 (+0900) Subject: fix handle leak error X-Git-Tag: accepted/tizen/common/20160419.143201^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a83aeead82a0064eca5442330395c5fed5191769;hp=e11b7908b42c3b215c11e53bda63d336e944ff19;p=archive%2Fplatform%2Fadaptation%2Fsamsung_exynos%2Flibtbm-exynos4412.git fix handle leak error Change-Id: I584c3031b3d8464fbf0e26654c4ce15c7657dd24 Signed-off-by: Junkyeong Kim --- diff --git a/src/tbm_bufmgr_exynos4412.c b/src/tbm_bufmgr_exynos4412.c index 521c9d8..3097fe2 100644 --- a/src/tbm_bufmgr_exynos4412.c +++ b/src/tbm_bufmgr_exynos4412.c @@ -604,7 +604,6 @@ _tbm_exynos_open_drm() struct udev_device *device = NULL, *drm_device = NULL, *device_parent = NULL; const char *filepath; struct stat s; - int fd = -1; int ret; TBM_EXYNOS_LOG ("[libtbm-exynos:%d] " @@ -663,6 +662,7 @@ _tbm_exynos_open_drm() ret = fstat(fd, &s); if (ret) { TBM_EXYNOS_LOG("fstat() failed %s.\n"); + close(fd); udev_device_unref(drm_device); udev_unref(udev); return -1;