diff options
author | Arkadiusz Miskiewicz <arekm@maven.pl> | 2007-12-18 15:34:14 -0500 |
---|---|---|
committer | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-12-18 15:34:14 -0500 |
commit | ce4fa1cedec0cf56b9979dfaa12a8d3a7c643df4 (patch) | |
tree | e1d9fc070121de9f50c3ccaa985bb8afc63b2190 /src | |
parent | 20568f66f9a9a60a33bd9a69ccc14a891c656836 (diff) |
RADEON: fix fd leak in lid detect code
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_output.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index c60ece81..6454460b 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 |