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

Chris Wilson ickle at kemper.freedesktop.org
Fri May 17 03:15:15 PDT 2013


 src/sna/sna_accel.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8d31fe771b423a3768cbd05db994d49e941369e1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri May 17 11:14:34 2013 +0100

    sna: Transfer ownership of the cloned bo to the pixmaps
    
    Fix the leak from the previous commit.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 1dd8491..b3dca97 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1590,6 +1590,7 @@ sna_pixmap_undo_cow(struct sna *sna, struct sna_pixmap *priv, unsigned flags)
 		}
 
 		cow->bo = bo;
+		assert(!list_is_empty(&cow->list));
 		while (!list_is_empty(&cow->list)) {
 			struct sna_pixmap *clone;
 
@@ -1600,6 +1601,7 @@ sna_pixmap_undo_cow(struct sna *sna, struct sna_pixmap *priv, unsigned flags)
 			kgem_bo_destroy(&sna->kgem, clone->gpu_bo);
 			clone->gpu_bo = bo;
 		}
+		kgem_bo_destroy(&sna->kgem, bo);
 	} else {
 		struct kgem_bo *bo = NULL;
 


More information about the xorg-commit mailing list