summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc')
-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;