summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-05-17 11:14:34 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-05-17 11:15:05 +0100
commit8d31fe771b423a3768cbd05db994d49e941369e1 (patch)
tree5206441c5078076c63df4aa343142f9e2490133e /src
parent5d9315873e02d4acc5ddffc698dbf8984cbd5c42 (diff)
sna: Transfer ownership of the cloned bo to the pixmaps
Fix the leak from the previous commit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 1dd84914..b3dca97a 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;