uxa/shadow: Free the buffer along the unexpected failure to attach to the pixmap

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-06-04 12:36:11 +01:00
parent c9bd4ed7d7
commit 63a55e9db9
1 changed files with 3 additions and 1 deletions

View File

@ -181,8 +181,10 @@ void intel_shadow_create(struct intel_screen_private *intel)
stride, buffer)) {
free(intel->shadow_buffer);
intel->shadow_buffer = buffer;
} else
} else {
free(bufer);
stride = intel->shadow_stride;
}
if (!intel->shadow_damage) {
intel->shadow_damage =