xf86-video-intel: src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Mon May 5 01:39:21 PDT 2014


 src/sna/sna_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ef178f7d6955e12383c64ad9ee706db0e931992e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon May 5 09:37:56 2014 +0100

    sna: Fix loop iteration whilst deleting connectors
    
    If we remove a connector/output, we need to not advance the iterator or
    else we skip over an output (as the array is reduces inside the loop).
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index e46f5d1..6a1d022 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2964,7 +2964,7 @@ void sna_mode_discover(struct sna *sna)
 	for (i = 0; i < sna->mode.num_real_output; i++) {
 		xf86OutputPtr output = config->output[i];
 		if (to_sna_output(output)->serial != serial) {
-			sna_output_del(output);
+			sna_output_del(output); i--;
 			changed = true;
 		}
 	}


More information about the xorg-commit mailing list