From: Junkyeong Kim Date: Mon, 18 Apr 2016 07:01:50 +0000 (+0900) Subject: fix handle leak error X-Git-Tag: submit/tizen/20160419.010408^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a83cf9e729066577e31cfc5a795012ddc4dec9a2;p=platform%2Fadaptation%2Fsamsung_exynos%2Flibtbm-exynos.git fix handle leak error Change-Id: Ic34089ecd326cb64dedb517708c58661bbdcf2e7 Signed-off-by: Junkyeong Kim --- diff --git a/src/tbm_bufmgr_exynos.c b/src/tbm_bufmgr_exynos.c index 14d82ab..e83d5ae 100644 --- a/src/tbm_bufmgr_exynos.c +++ b/src/tbm_bufmgr_exynos.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;