diff options
author | Adam Jackson <ajax@redhat.com> | 2016-03-01 14:09:29 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-03-02 10:03:11 -0500 |
commit | 093f9505c12565cc19bdf6e33b263f31d104c3ef (patch) | |
tree | 8fbafbffcaf0dd5b40473d574440d0d619368407 /Xext | |
parent | ac4d8c7cee13947b688ebb26035f06f7744db201 (diff) |
xv: Fix unchecked AddResource
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/xvmain.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Xext/xvmain.c b/Xext/xvmain.c index 0c6f25b5a..3a0263427 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -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; |