talloc_free_children in samba4 talloc?

Andrew Tridgell tridge at osdl.org
Tue Apr 26 03:19:18 GMT 2005


Volker,

 > Looking closer at merging talloc in Samba 4 to Samba 3 it seems a bit more
 > difficult to get rid of talloc_destroy_pool.

before adding this, I think it is worthwhile seeing if we can't just
get rid of talloc_destroy_pool(). For example, in the rpc code I think
we could do this:

void free_pipe_context(pipes_struct *p)
{
	talloc_free(p->mem_ctx);
	p->mem_ctx = talloc_init("pipe %s %p", p->name, p);
	if (p->mem_ctx == NULL) {
		p->fault_state = True;
	}
}

totally untested code, but I think it does what is intended, and
should not require changing the way that the Samba3 rpc code works.

Cheers, Tridge


More information about the samba-technical mailing list