Commit 8e32d9d2 authored by Adam Jackson's avatar Adam Jackson 💣

Fix memory leak in mode validation

Reviewed-by: Julien Cristau's avatarJulien Cristau <jcristau@debian.org>
Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent b1f7f190
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment