summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-04 11:54:28 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-04 11:54:28 +0100
commit33f0b4b96662d953052232b1c0477ced0c326a62 (patch)
tree873c2771b7449d907a9825468cdde17aca808d55
parentd24340747389db971c04349d1ee517f195c2b28e (diff)
legacy/i810: Free offscreen image info struct on failure
Impossible with the current code, the server aborts on failure. However, this looks to be the simple answer to keep static analysers quiet. Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/legacy/i810/i810_video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/legacy/i810/i810_video.c b/src/legacy/i810/i810_video.c
index 729aa8b3..613cbf22 100644
--- a/src/legacy/i810/i810_video.c
+++ b/src/legacy/i810/i810_video.c
@@ -1411,6 +1411,7 @@ I810InitOffscreenImages(ScreenPtr screen)
offscreenImages[0].num_attributes = 1;
offscreenImages[0].attributes = Attributes;
- xf86XVRegisterOffscreenImages(screen, offscreenImages, 1);
+ if (!xf86XVRegisterOffscreenImages(screen, offscreenImages, 1))
+ free(offscreenImages);
}