aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-10-21 02:43:20 +0200
committerMihai Moldovan <ionic@ionic.de>2018-02-07 23:15:57 +0100
commite85c6885e7f44d35248281c867e16be8a3fb97f1 (patch)
treee5b2adf0c6100d9bd89d623b5dcff82ae0a820a4
parent62373d42824c66a8a4a95d5a3a8953d2fcca544d (diff)
downloadnx-libs-e85c6885e7f44d35248281c867e16be8a3fb97f1.tar.gz
nx-libs-e85c6885e7f44d35248281c867e16be8a3fb97f1.tar.bz2
nx-libs-e85c6885e7f44d35248281c867e16be8a3fb97f1.zip
Xext: lift sync.c to xorg-xserver-7.1/1.1 state
-rw-r--r--nx-X11/programs/Xserver/Xext/sync.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c
index 7fa6145a6..48b142f82 100644
--- a/nx-X11/programs/Xserver/Xext/sync.c
+++ b/nx-X11/programs/Xserver/Xext/sync.c
@@ -296,14 +296,18 @@ static void
SyncDeleteTriggerFromCounter(pTrigger)
SyncTrigger *pTrigger;
{
- SyncTriggerList *pCur, *pPrev = NULL;
+ SyncTriggerList *pCur;
+ SyncTriggerList *pPrev;
/* pCounter needs to be stored in pTrigger before calling here. */
if (!pTrigger->pCounter)
return;
- for (pCur = pTrigger->pCounter->pTriglist; pCur; pCur = pCur->next)
+ pPrev = NULL;
+ pCur = pTrigger->pCounter->pTriglist;
+
+ while (pCur)
{
if (pCur->pTrigger == pTrigger)
{
@@ -311,9 +315,14 @@ SyncDeleteTriggerFromCounter(pTrigger)
pPrev->next = pCur->next;
else
pTrigger->pCounter->pTriglist = pCur->next;
+
+ xfree(pCur);
free(pCur);
break;
}
+
+ pPrev = pCur;
+ pCur = pCur->next;
}
if (IsSystemCounter(pTrigger->pCounter))