we should start with an empty switch_list
in ndr_print as we do for ndr_pull/ndr_push
metze
{
struct ndr_print *ndr;
- ndr = talloc(NULL, struct ndr_print);
+ ndr = talloc_zero(NULL, struct ndr_print);
if (!ndr) return;
ndr->print = ndr_print_debug_helper;
ndr->depth = 1;
ndr->flags = 0;
- ndr->switch_list = talloc(ndr, struct ndr_token_list);
- if (!ndr->switch_list)
- goto fail;
fn(ndr, name, ptr);
-fail:
talloc_free(ndr);
}
{
struct ndr_print *ndr;
- ndr = talloc(NULL, struct ndr_print);
+ ndr = talloc_zero(NULL, struct ndr_print);
if (!ndr) return;
ndr->print = ndr_print_debug_helper;
ndr->depth = 1;