te = tokenEvents;
ltep = &tokenEvents;
while (te) {
- if (UuidEqual((UUID *)&uuid, (UUID *)&te->uuid, &status))
+ if (UuidEqual((UUID *)&uuid, (UUID *)&te->uuid, &status)) {
*ltep = te->next;
lock_ReleaseMutex(&tokenEventLock);
memcpy(sessionKey, te->sessionKey,
sizeof(te->sessionKey));
free(te);
return TRUE;
- ltep = &te->next;
- te = te->next;
+ }
+ ltep = &te->next;
+ te = te->next;
}
lock_ReleaseMutex(&tokenEventLock);
return FALSE;