summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiusz Miskiewicz <arekm@maven.pl>2007-12-18 15:34:14 -0500
committerAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-12-18 15:34:14 -0500
commitce4fa1cedec0cf56b9979dfaa12a8d3a7c643df4 (patch)
treee1d9fc070121de9f50c3ccaa985bb8afc63b2190
parent20568f66f9a9a60a33bd9a69ccc14a891c656836 (diff)
RADEON: fix fd leak in lid detect code
-rw-r--r--src/radeon_output.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c
index c60ece8..6454460 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -699,15 +699,18 @@ RADEONDetectLidStatus(ScrnInfoPtr pScrn)
while (fgets(lidline, sizeof lidline, f)) {
if (!strncmp(lidline, "state:", strlen ("state:"))) {
if (strstr(lidline, "open")) {
+ fclose(f);
ErrorF("proc lid open\n");
return MT_LCD;
}
else if (strstr(lidline, "closed")) {
+ fclose(f);
ErrorF("proc lid closed\n");
return MT_NONE;
}
}
}
+ fclose(f);
}
#endif