fix handle leak error 75/66275/2 accepted/tizen/common/20160419.143257 accepted/tizen/ivi/20160419.050310 accepted/tizen/mobile/20160419.050300 accepted/tizen/tv/20160419.050236 accepted/tizen/wearable/20160419.050222 submit/tizen/20160419.010408
authorJunkyeong Kim <jk0430.kim@samsung.com>
Mon, 18 Apr 2016 07:01:50 +0000 (16:01 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Mon, 18 Apr 2016 12:15:28 +0000 (21:15 +0900)
Change-Id: Ic34089ecd326cb64dedb517708c58661bbdcf2e7
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/tbm_bufmgr_exynos.c

index 14d82ab..e83d5ae 100644 (file)
@@ -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;