From fa27fa88da5935e1ce0d01e4b32f8b1e35eea39b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 4 Apr 2005 05:52:53 +0000 Subject: r6188: correct fix for rev 6182 we should start with an empty switch_list in ndr_print as we do for ndr_pull/ndr_push metze (This used to be commit 848f553117b369fc6697086b3f7d36dd17b60f5b) --- source4/librpc/ndr/ndr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source4/librpc/ndr/ndr.c') diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 3a7ad7f29e..c5360ee664 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -315,16 +315,12 @@ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr) { 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); } @@ -335,7 +331,7 @@ void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int fla { 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; -- cgit