diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-04 11:53:26 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-04 11:53:26 +0100 |
commit | d24340747389db971c04349d1ee517f195c2b28e (patch) | |
tree | d823e6c414de090a26e00731e7f3a3fd4984e92c | |
parent | 1215abc5c30cc3e183bde59b1523c09b59c484e3 (diff) |
sna: Free clip boxes (if allocated) along error path
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_io.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c index 0d6fbbbc..3c6044c5 100644 --- a/src/sna/sna_io.c +++ b/src/sna/sna_io.c @@ -646,8 +646,11 @@ tile: tmp.drawable.bitsPerPixel, KGEM_BUFFER_WRITE_INPLACE, &ptr); - if (!src_bo) + if (!src_bo) { + if (clipped != stack) + free(clipped); goto fallback; + } c = clipped; for (n = 0; n < nbox; n++) { @@ -683,8 +686,11 @@ tile: kgem_bo_destroy(&sna->kgem, src_bo); - if (!n) + if (!n) { + if (clipped != stack) + free(clipped); goto fallback; + } } } |