Commit 392058f7 392058f7ea610ed631499a8dd3cf06041f3e5fa0 by Sergey Poznyakoff

Bugfix

1 parent d6e4eade
......@@ -288,15 +288,13 @@ list_do (list_t list, list_action_t * action, void *cbdata)
status = iterator_create(&itr, list);
if (status)
return status;
monitor_rdlock (list->monitor);
for (iterator_first (itr); !iterator_is_done (itr); iterator_next (itr))
{
void *item;
iterator_current (itr, &item);
if ((status = action (current->item, cbdata)))
if ((status = action (item, cbdata)))
break;
}
monitor_unlock (list->monitor);
iterator_destroy (&itr);
return status;
}
......