xf86-video-amdgpu: Branch 'master'
Michel Dänzer
daenzer at kemper.freedesktop.org
Wed Apr 13 09:19:46 UTC 2016
src/amdgpu_dri3.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit b93006714b8de972060492cfa311320921a73773
Author: Tom St Denis <tom.stdenis at amd.com>
Date: Tue Apr 12 08:48:33 2016 -0400
dri3: Return NULL from amdgpu_dri3_pixmap_from_fd if calloc fails.
Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
diff --git a/src/amdgpu_dri3.c b/src/amdgpu_dri3.c
index 0686599..f87c014 100644
--- a/src/amdgpu_dri3.c
+++ b/src/amdgpu_dri3.c
@@ -138,8 +138,13 @@ static PixmapPtr amdgpu_dri3_pixmap_from_fd(ScreenPtr screen,
if (pixmap) {
struct amdgpu_pixmap *priv = calloc(1, sizeof(*priv));
- amdgpu_set_pixmap_private(pixmap, priv);
- return pixmap;
+ if (priv) {
+ amdgpu_set_pixmap_private(pixmap, priv);
+ return pixmap;
+ }
+
+ screen->DestroyPixmap(pixmap);
+ return NULL;
}
}
#endif
More information about the xorg-commit
mailing list