Close file descriptor before error return
1 files changed, 3 insertions(+), 1 deletions(-) M drmgamma.c
M drmgamma.c => drmgamma.c +3 -1
@@ 186,8 186,10 @@ main(int argc, char *argv[]) return error("Cannot open '%s': %s.", devnode, strerror(errno)); if (!drmIsMaster(fd)) { if (drmSetMaster(fd)) if (drmSetMaster(fd)) { close(fd); return error("Could not become DRM master: %s.", strerror(errno)); } } drmModeRes *resources = drmModeGetResources(fd);