diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-11 13:59:08 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-11 13:59:08 +0100 |
commit | ae887c9d1cb2a06c515e054b36464bcf65440f9f (patch) | |
tree | 20b561fc19654c03269fd4993e56fabdb09034d9 | |
parent | 72fafdfd374eb165e703b791c70592c47e5772fc (diff) |
sna/trapezoids: Prevent a memleak if feed lots of degenerate boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_trapezoids.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index ac2a6da5..fc514360 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -1561,7 +1561,7 @@ composite_aligned_boxes(CARD8 op, } if (num_boxes == 0) - return true; + goto free_boxes; DBG(("%s: extents (%d, %d), (%d, %d) offset of (%d, %d)\n", __FUNCTION__, @@ -1629,6 +1629,7 @@ composite_aligned_boxes(CARD8 op, done: REGION_UNINIT(NULL, &clip); +free_boxes: if (boxes != stack_boxes) free(boxes); |