- ATS crashes [MW]
- UDP fragmentation [MW]
* CORE:
- - Core API's peer_change_preference leaks 'irc' and
- Core API's notify_transmit_ready leaks 'th'!
+ - Core API's notify_transmit_ready leaks 'th'!
* FS [CG]
- download of 100 MB file from 'leach' peer hung due to
failure of core-api to call back after a change preference request
- testcase would be nice
- generic block support for DHT
* STATISTICS:
- - test notification-based statistics API
- implement statistics GUI (=> start from gnunet-gtk by button!)
* PEERINFO: [NN]
- move peerinfo to new GUI (=> start from gnunet-gtk by button!)
*/
void *pcic_cls;
+ /**
+ * Pointer to free when we call pcic.
+ */
+ void *pcic_ptr;
+
/**
* Request information ID for the given pcic (needed in case a
* request is cancelled after being submitted to core and a new
if (NULL != (pcic = pr->pcic))
{
pr->pcic = NULL;
+ GNUNET_free_non_null (pr->pcic_ptr);
+ pr->pcic_ptr = NULL;
pcic (pr->pcic_cls,
&pr->peer,
zero,
}
pcic = pr->pcic;
pr->pcic = NULL;
+ GNUNET_free_non_null (pr->pcic_ptr);
+ pr->pcic_ptr = NULL;
if (pcic != NULL)
pcic (pr->pcic_cls,
&pr->peer,
irc = GNUNET_malloc (sizeof (struct GNUNET_CORE_InformationRequestContext));
irc->h = h;
irc->pr = pr;
- // FIXME: who frees 'irc'? (if not cancelled?)
cm = GNUNET_malloc (sizeof (struct ControlMessage) +
sizeof (struct RequestInfoMessage));
cm->cont = &change_preference_send_continuation;
cm);
pr->pcic = info;
pr->pcic_cls = info_cls;
+ pr->pcic_ptr = irc; /* for free'ing irc */
if (h->control_pending_head == cm)
trigger_next_request (h, GNUNET_NO);
return irc;
struct GNUNET_CORE_Handle *h = irc->h;
struct PeerRecord *pr = irc->pr;
+ GNUNET_assert (pr->pcic_ptr == irc);
if (irc->cm != NULL)
{
GNUNET_CONTAINER_DLL_remove (h->control_pending_head,
}
pr->pcic = NULL;
pr->pcic_cls = NULL;
+ pr->pcic_ptr = NULL;
GNUNET_free (irc);
}