On Mon, Feb 20, 2017 at 12:55:49PM -0600, Xiaogang Chen wrote:
> xf86DDCGetModes generates some DisplayMods that are not used and not released
> after.
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99521
>
> Signed-off-by: Xiaogang Chen <[email protected]>
> ---
> hw/xfree86/modes/xf86EdidModes.c | 17 +++++------------
> 1 file changed, 5 insertions(+), 12 deletions(-)
>
> diff --git a/hw/xfree86/modes/xf86EdidModes.c
> b/hw/xfree86/modes/xf86EdidModes.c
> index f0e1e97..915b291 100644
> --- a/hw/xfree86/modes/xf86EdidModes.c
> +++ b/hw/xfree86/modes/xf86EdidModes.c
> @@ -1201,18 +1201,11 @@ xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor,
> xf86MonPtr DDC)
> /* look for last Mode */
> Mode = Modes;
>
> - while (Mode->next)
> - Mode = Mode->next;
> + /*release these video modes that are not used after*/
> + while (Mode) {
> + xf86DeleteMode(&Modes, Mode);
> + Mode = Modes;
> + }
this bit seems correct
>
> - /* add to MonPtr */
> - if (Monitor->Modes) {
> - Monitor->Last->next = Modes;
> - Modes->prev = Monitor->Last;
> - Monitor->Last = Mode;
> - }
> - else {
> - Monitor->Modes = Modes;
> - Monitor->Last = Mode;
> - }
but why are you removing this bit? If that's intended, please expand your
commit message because right now it looks like these are two separate
changes.
Cheers,
Peter
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel