XF86VidMode: Fix free() on walked pointer

Based on: https://patchwork.freedesktop.org/patch/85636/

Rewritten to just not walk the pointer.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Emi Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Hans de Goede 2016-09-23 14:11:52 +03:00 committed by Adam Jackson
parent 220d327ee0
commit 380c2ca25e

View File

@ -1364,7 +1364,7 @@ ProcVidModeGetDotClocks(ClientPtr client)
WriteToClient(client, sizeof(xXF86VidModeGetDotClocksReply), &rep); WriteToClient(client, sizeof(xXF86VidModeGetDotClocksReply), &rep);
if (!ClockProg) { if (!ClockProg) {
for (n = 0; n < numClocks; n++) { for (n = 0; n < numClocks; n++) {
dotclock = *Clocks++; dotclock = Clocks[n];
if (client->swapped) { if (client->swapped) {
WriteSwappedDataToClient(client, 4, (char *) &dotclock); WriteSwappedDataToClient(client, 4, (char *) &dotclock);
} }