[PATCH 1/2] Fix memory leak in mode validation

Adam Jackson ajax at redhat.com
Mon Feb 14 09:45:34 PST 2011


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 src/vesa.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/vesa.c b/src/vesa.c
index 2523d76..ef01881 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -391,6 +391,7 @@ VESAValidMode(int scrn, DisplayModePtr p, Bool flag, int pass)
     for (v = mon->vrefresh[0].lo; v <= mon->vrefresh[0].hi; v++) {
 	mode = xf86GTFMode(p->HDisplay, p->VDisplay, v, 0, 0);
 	ret = xf86CheckModeForMonitor(mode, mon);
+	free(mode->name);
 	free(mode);
 	if (ret == MODE_OK)
 	    break;
-- 
1.7.3.5



More information about the xorg-devel mailing list