diff options
author | Julien Cristau <jcristau@debian.org> | 2016-03-07 23:20:27 +0100 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-03-08 10:19:37 -0500 |
commit | ac97fb2b804809c39b12fe0032d96fb076657258 (patch) | |
tree | 27f905f30e147155d861ec1faf84fa935504b334 /dri3/dri3_request.c | |
parent | 119d5c0e2f800737c949ef760c5fe25d963200bf (diff) |
dri3: return an error if AddResource fails
Reviewed-by: RĂ©mi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Diffstat (limited to 'dri3/dri3_request.c')
-rw-r--r-- | dri3/dri3_request.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c index 2b3622148..35548b6d2 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; } |