state->domain->libnet_ctx = libnet_context_init(service->task->event_ctx,
service->task->lp_ctx);
+ if (state->domain->libnet_ctx == NULL) goto failed;
+ talloc_steal(state->domain, state->domain->libnet_ctx);
/* Create a credentials structure */
state->domain->libnet_ctx->cred = cli_credentials_init(state->domain);