[PATCH 1/2] Xext: Recover from miSyncInitFenceFromFD failure without crashing
Keith Packard
keithp at keithp.com
Mon Nov 18 22:42:17 PST 2013
miSyncDestroyFence must not be called unless miSyncInitFence has been
invoked, so if miSyncInitFenceFromFD fails, we must free the fence
manually.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
Xext/sync.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Xext/sync.c b/Xext/sync.c
index dd18cde..2d58ea1 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -929,7 +929,7 @@ SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL
status = miSyncInitFenceFromFD(pDraw, pFence, fd, initially_triggered);
if (status != Success) {
- miSyncDestroyFence(pFence);
+ dixFreeObjectWithPrivates(pFence, PRIVATE_SYNC_FENCE);
return status;
}
--
1.8.4.2
More information about the xorg-devel
mailing list