summaryrefslogtreecommitdiff
path: root/Xext/xvmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/xvmain.c')
-rw-r--r--Xext/xvmain.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 3a0263427..c9b11d4bb 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -800,10 +800,9 @@ XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, BOOL onoff)
if (!(tpn = malloc(sizeof(XvVideoNotifyRec))))
return BadAlloc;
tpn->next = NULL;
- if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn)) {
- free(tpn);
+ tpn->client = NULL;
+ if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn))
return BadAlloc;
- }
}
else {
/* LOOK TO SEE IF ENTRY ALREADY EXISTS */