From c59a33a1e2142e0bada8bd19a1a9f86d807c058a Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 10 Jan 2013 19:48:53 +0000 Subject: [PATCH] tests/setbacklight: Close filedescriptor on return paths --- tests/setbacklight.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/setbacklight.c b/tests/setbacklight.c index 8c7eb27..92bd4bf 100644 --- a/tests/setbacklight.c +++ b/tests/setbacklight.c @@ -74,9 +74,11 @@ get_drm_connector_type(struct udev_device *drm_device, uint32_t connector_id) drmModeFreeConnector(connector); drmModeFreeResources(res); + close(fd); return connector_type; } + close(fd); drmModeFreeResources(res); return -1; } -- 2.7.4