diff options
author | Keith Packard <keithp@keithp.com> | 2013-11-18 22:33:27 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-11-23 22:06:19 -0800 |
commit | 037566c57caff93fd7717f385d4b532b81f19c77 (patch) | |
tree | a5caf961a3b3e08e5e87daf51e51fd02f1ee6c38 /Xext | |
parent | e7000534a456fdf9cd4eaada3193846c8525f740 (diff) |
Xext: Recover from miSyncInitFenceFromFD failure without crashing
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@keithp.com>
Tested-by: Fredrik Höglund <fredrik@kde.org>
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/sync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Xext/sync.c b/Xext/sync.c index dd18cdebd..2d58ea1fa 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; } |