tests/setbacklight: Close filedescriptor on return paths
This commit is contained in:
parent
e6675c28b5
commit
c59a33a1e2
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user