summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-04-04 05:52:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:24 -0500
commitfa27fa88da5935e1ce0d01e4b32f8b1e35eea39b (patch)
treeb5deaeb09185a35d2267086799f53faec8fb9be9 /source4/librpc/ndr/ndr.c
parentcf97980f3129b9a3eb7bdf3ae95f4fd99a597259 (diff)
downloadsamba-fa27fa88da5935e1ce0d01e4b32f8b1e35eea39b.tar.gz
samba-fa27fa88da5935e1ce0d01e4b32f8b1e35eea39b.tar.bz2
samba-fa27fa88da5935e1ce0d01e4b32f8b1e35eea39b.zip
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)
Diffstat (limited to 'source4/librpc/ndr/ndr.c')
-rw-r--r--source4/librpc/ndr/ndr.c8
1 files changed, 2 insertions, 6 deletions
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;