summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-04 11:47:32 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-04 12:51:01 +0000
commit227fbb90c4884bbc58c6c0cfff9663ec9ca54171 (patch)
tree34ff96662df54cd7305b94c8900227b506042335 /src/sna
parent0ed758cd2176ee4f34e03d05d05130d52d75e577 (diff)
sna: Carefully free the freed_pixmap upon exit
As the contents of the pixmap are now rubbish, we need to manually destroy it rather than pass it to the normal sna_pixmap_destroy() routines. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_accel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index ab975a9d..9279b58b 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -9664,7 +9664,8 @@ void sna_accel_close(struct sna *sna)
{
if (sna->freed_pixmap) {
assert(sna->freed_pixmap->refcnt == 1);
- sna_destroy_pixmap(sna->freed_pixmap);
+ free(sna_pixmap(sna->freed_pixmap));
+ fbDestroyPixmap(sna->freed_pixmap);
sna->freed_pixmap = NULL;
}