/** Destroy a whole pool including the context */ void talloc_destroy(TALLOC_CTX *t) { if (!t) return; talloc_destroy_pool(t); talloc_disenroll(t); memset(t, 0, sizeof(TALLOC_CTX)); SAFE_FREE(t); }
void free_pipe_context(pipes_struct *p) { if (p->mem_ctx) { DEBUG(3,("free_pipe_context: destroying talloc pool of size %lu\n", (unsigned long)talloc_pool_size(p->mem_ctx) )); talloc_destroy_pool(p->mem_ctx); } else { p->mem_ctx = talloc_init("pipe %s %p", p->name, p); if (p->mem_ctx == NULL) p->fault_state = True; } }