Example #1
0
void
dns_difftuple_free(dns_difftuple_t **tp) {
	dns_difftuple_t *t = *tp;
	REQUIRE(DNS_DIFFTUPLE_VALID(t));
	dns_name_invalidate(&t->name);
	t->magic = 0;
	isc_mem_free(t->mctx, t);
	*tp = NULL;
}
Example #2
0
void
dns_name_free(dns_name_t *name, isc_mem_t *mctx) {
	size_t size;

	/*
	 * Free 'name'.
	 */

	REQUIRE(VALID_NAME(name));
	REQUIRE((name->attributes & DNS_NAMEATTR_DYNAMIC) != 0);

	size = name->length;
	if ((name->attributes & DNS_NAMEATTR_DYNOFFSETS) != 0)
		size += name->labels;
	isc_mem_put(mctx, name->ndata, size);
	dns_name_invalidate(name);
}