示例#1
0
/**
 * Release user data from TX descriptor, then return it to the pool.
 */
static void
udp_tx_desc_release(struct udp_tx_desc *txd, udp_sched_t *us)
{
	udp_tx_desc_check(txd);
	udp_sched_check(us);

	pmsg_free_null(&txd->mb);
	atom_host_free_null(&txd->to);
	pfree(us->txpool, txd);
}
示例#2
0
/**
 * Free NAT-PMP RPC descriptor.
 */
static void
natpmp_rpc_free(struct natpmp_rpc *rd)
{
	natpmp_rpc_check(rd);

	g_assert(uint_is_positive(natpmp_rpc_pending));

	natpmp_rpc_pending--;

	pmsg_free_null(&rd->mb);
	rd->magic = 0;
	WFREE(rd);
}
示例#3
0
文件: soap.c 项目: Haxe/gtk-gnutella
/**
 * Free a SOAP request.
 */
static void
soap_rpc_free(soap_rpc_t *sr)
{
	soap_rpc_check(sr);

	atom_str_free_null(&sr->url);
	atom_str_free_null(&sr->action);
	cq_cancel(&sr->delay_ev);
	http_async_cancel_null(&sr->ha);
	header_free_null(&sr->header);
	pmsg_free_null(&sr->mb);
	HFREE_NULL(sr->reply_data);

	sr->magic = 0;
	WFREE(sr);
}