summaryrefslogtreecommitdiff
path: root/src/intel_shadow.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-04 12:36:11 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-04 12:36:11 +0100
commit63a55e9db97b647cbf7385403a0f30ee4d24dc3b (patch)
treeddec2fa2ddafe1ea567cca01173d8466bf4f5345 /src/intel_shadow.c
parentc9bd4ed7d7d5c9ba6924e911652e03abc9267865 (diff)
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>
Diffstat (limited to 'src/intel_shadow.c')
-rw-r--r--src/intel_shadow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel_shadow.c b/src/intel_shadow.c
index 393a0384..1342b79b 100644
--- a/src/intel_shadow.c
+++ b/src/intel_shadow.c
@@ -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 =