mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xv: Fix unchecked AddResource
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
@@ -844,7 +844,8 @@ XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, BOOL onoff)
|
||||
|
||||
tpn->client = NULL;
|
||||
tpn->id = FakeClientID(client->index);
|
||||
AddResource(tpn->id, XvRTVideoNotify, tpn);
|
||||
if (!AddResource(tpn->id, XvRTVideoNotify, tpn))
|
||||
return BadAlloc;
|
||||
|
||||
tpn->client = client;
|
||||
return Success;
|
||||
@@ -893,7 +894,8 @@ XvdiSelectPortNotify(ClientPtr client, XvPortPtr pPort, BOOL onoff)
|
||||
|
||||
tpn->client = client;
|
||||
tpn->id = FakeClientID(client->index);
|
||||
AddResource(tpn->id, XvRTPortNotify, tpn);
|
||||
if (!AddResource(tpn->id, XvRTPortNotify, tpn))
|
||||
return BadAlloc;
|
||||
|
||||
return Success;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user