dri1: Fix unchecked AddResource
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
parent
093f9505c1
commit
05e1bcf56e
|
@ -1032,7 +1032,8 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual,
|
|||
}
|
||||
|
||||
/* track this in case the client dies before cleanup */
|
||||
AddResource(context, DRIContextPrivResType, (void *) pDRIContextPriv);
|
||||
if (!AddResource(context, DRIContextPrivResType, (void *) pDRIContextPriv))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1263,8 +1264,9 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable,
|
|||
}
|
||||
|
||||
/* track this in case the client dies */
|
||||
AddResource(FakeClientID(client->index), DRIDrawablePrivResType,
|
||||
(void *) (intptr_t) pDrawable->id);
|
||||
if (!AddResource(FakeClientID(client->index), DRIDrawablePrivResType,
|
||||
(void *) (intptr_t) pDrawable->id))
|
||||
return FALSE;
|
||||
|
||||
if (pDRIDrawablePriv->hwDrawable) {
|
||||
drmUpdateDrawableInfo(pDRIPriv->drmFD,
|
||||
|
|
Loading…
Reference in New Issue
Block a user