summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-11-17 11:45:09 -0500
committerAlex Deucher <alexdeucher@gmail.com>2009-11-17 11:49:46 -0500
commitc2892cbd18e0f25401b615055425f727e096b7cd (patch)
tree9635f3f4b12e587a096cd9c4df742bb2e6fb0fa9
parent93de38348fa77987297c3977d5acddbae54fbc10 (diff)
radeon: fix potential memory leak in ddc code
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r--src/radeon_output.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c
index acba31f9..edf59cdc 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -268,9 +268,11 @@ radeon_ddc_connected(xf86OutputPtr output)
break;
}
- if (MonType != MT_NONE)
+ if (MonType != MT_NONE) {
if (!xf86ReturnOptValBool(info->Options, OPTION_IGNORE_EDID, FALSE))
xf86OutputSetEDID(output, MonInfo);
+ } else
+ xfree(MonInfo);
} else
MonType = MT_NONE;