client);
for (struct ZoneMonitor *zm = monitor_head; NULL != zm; zm = zm->next)
{
+ struct StoreActivity *san;
+
if (nc != zm->nc)
continue;
GNUNET_CONTAINER_DLL_remove (monitor_head,
GNUNET_SCHEDULER_cancel (zm->task);
zm->task = NULL;
}
- for (struct StoreActivity *sa = sa_head; NULL != sa; sa = sa->next)
+ for (struct StoreActivity *sa = sa_head; NULL != sa; sa = san)
{
+ san = sa->next;
if (zm == sa->zm_pos)
{
sa->zm_pos = zm->next;
+ /* this may free sa */
continue_store_activity (sa);
}
}
{
if (sa->nc == nc)
{
+ /* this may free sa */
free_store_activity (sa);
break; /* there can only be one per nc */
}