diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-04-04 05:52:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:24 -0500 |
commit | fa27fa88da5935e1ce0d01e4b32f8b1e35eea39b (patch) | |
tree | b5deaeb09185a35d2267086799f53faec8fb9be9 /source4 | |
parent | cf97980f3129b9a3eb7bdf3ae95f4fd99a597259 (diff) | |
download | samba-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')
-rw-r--r-- | source4/librpc/ndr/ndr.c | 8 |
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; |