diff options
author | Martin Ettl <ettl.martin@gmx.de> | 2009-10-08 13:27:30 +1100 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2009-10-08 13:27:30 +1100 |
commit | 4df3e8c8053d9d4b3043f339a73d0de97020d884 (patch) | |
tree | f7444e06c461491996bf146f4320ccfbd523ee53 /hw/xfree86/os-support/linux/lnx_video.c | |
parent | 4151a13c80f3afa43f88afcf19a7aeb16dace93a (diff) |
Resource leakage: 0 is a valid file descriptor
When testing if an fd is valid, the required construct is >= 0, not > 0.
[Daniel: Fixed up the Linux MTRR case as well.]
Signed-off-by: Martin Ettl <ettl.martin@gmx.de>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_video.c')
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c index 73409dfba..09d178797 100644 --- a/hw/xfree86/os-support/linux/lnx_video.c +++ b/hw/xfree86/os-support/linux/lnx_video.c @@ -336,7 +336,7 @@ mtrr_undo_wc_region(int screenNum, struct mtrr_wc_region *wcr) { struct mtrr_wc_region *p, *prev; - if (mtrr_fd > 0) { + if (mtrr_fd >= 0) { p = wcr; while (p) { if (p->added) |