xf86-video-modesetting: src/driver.c
Dave Airlie
airlied at kemper.freedesktop.org
Sat Apr 14 11:25:49 PDT 2012
src/driver.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit a9e49bd15bb5e525e64f95b1531975ad1997eafb
Author: Dave Airlie <airlied at redhat.com>
Date: Sat Apr 14 19:21:47 2012 +0100
dirty: check malloc return
Suggested by keithp.
Signed-off-by: Dave Airlie <airlied at redhat.com>
diff --git a/src/driver.c b/src/driver.c
index 95d6b90..b776ca1 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -327,7 +327,10 @@ static void dispatch_dirty(ScreenPtr pScreen)
drmModeClip *clip = malloc(num_cliprects * sizeof(drmModeClip));
BoxPtr rect = REGION_RECTS(dirty);
int i, ret;
-
+
+ if (!clip)
+ return;
+
/* XXX no need for copy? */
for (i = 0; i < num_cliprects; i++, rect++) {
clip[i].x1 = rect->x1;
More information about the xorg-commit
mailing list