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>
This commit is contained in:
parent
e7000534a4
commit
037566c57c
|
@ -929,7 +929,7 @@ SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL
|
||||||
|
|
||||||
status = miSyncInitFenceFromFD(pDraw, pFence, fd, initially_triggered);
|
status = miSyncInitFenceFromFD(pDraw, pFence, fd, initially_triggered);
|
||||||
if (status != Success) {
|
if (status != Success) {
|
||||||
miSyncDestroyFence(pFence);
|
dixFreeObjectWithPrivates(pFence, PRIVATE_SYNC_FENCE);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue