- Using a "global" variable for local iteration is...
static FSM_t fsmFree(FSM_t fsm)
{
+ hardLink_t li;
fsm->buf = _free(fsm->buf);
fsm->bufsize = 0;
fsm->path = _free(fsm->path);
fsm->suffix = _free(fsm->suffix);
- while ((fsm->li = fsm->links) != NULL) {
- fsm->links = fsm->li->next;
- fsm->li->next = NULL;
- fsm->li = freeHardLink(fsm->li);
+
+ while ((li = fsm->links) != NULL) {
+ fsm->links = li->next;
+ li->next = NULL;
+ freeHardLink(li);
}
free(fsm);
return NULL;