Patch to catch handle NULL return from calloc properly.

Tom St Denis

From 6b306d6a2bfa0d899aca691916197d82782e9525 Mon Sep 17 00:00:00 2001
From: Tom St Denis <tom.stde...@amd.com>
Date: Fri, 8 Apr 2016 10:22:11 -0400
Subject: [PATCH] radeon/dri3: Return NULL if calloc fails.

Signed-off-by: Tom St Denis <tom.stde...@amd.com>
---
 src/radeon_dri3.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/radeon_dri3.c b/src/radeon_dri3.c
index 43a073be55f8..c567024618a1 100644
--- a/src/radeon_dri3.c
+++ b/src/radeon_dri3.c
@@ -144,6 +144,7 @@ static PixmapPtr radeon_dri3_pixmap_from_fd(ScreenPtr screen,
 			}
 
 			screen->DestroyPixmap(pixmap);
+			return NULL;
 		}
 	}
 #endif
-- 
2.8.1

_______________________________________________
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
https://lists.x.org/mailman/listinfo/xorg-driver-ati

Reply via email to