struct tevent_req *subreq;
int ret;
- npc = talloc_zero(NULL, struct named_pipe_client);
+ npc = talloc_zero(ev_ctx, struct named_pipe_client);
if (!npc) {
DEBUG(0, ("Out of memory!\n"));
close(fd);
data_blob_free(&npc->p->out_data.frag);
data_blob_free(&npc->p->out_data.rdata);
+ talloc_free_children(npc->p->mem_ctx);
+
/* Wait for the next packet */
subreq = dcerpc_read_ncacn_packet_send(npc, npc->ev, npc->tstream);
if (!subreq) {
data_blob_free(&ncacn_conn->p->out_data.frag);
data_blob_free(&ncacn_conn->p->out_data.rdata);
+ talloc_free_children(ncacn_conn->p->mem_ctx);
+
/* Wait for the next packet */
subreq = dcerpc_read_ncacn_packet_send(ncacn_conn,
ncacn_conn->ev_ctx,