[PATCH xserver 2/9] dri3: return an error if AddResource fails

Julien Cristau jcristau at debian.org
Mon Mar 7 22:20:27 UTC 2016


Signed-off-by: Julien Cristau <jcristau at debian.org>
---
 dri3/dri3_request.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index 2b36221..35548b6 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -178,8 +178,8 @@ proc_dri3_pixmap_from_buffer(ClientPtr client)
         (*drawable->pScreen->DestroyPixmap) (pixmap);
         return rc;
     }
-    if (AddResource(stuff->pixmap, RT_PIXMAP, (void *) pixmap))
-        return Success;
+    if (!AddResource(stuff->pixmap, RT_PIXMAP, (void *) pixmap))
+        return BadAlloc;
 
     return Success;
 }
-- 
2.7.0



More information about the xorg-devel mailing list