From b7e1ea20dc873a753ff64653987130f03897a4e9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 21 Aug 2004 07:43:29 +0000 Subject: r1985: take advantage of the new talloc in a few more places (This used to be commit 6ffdfd779936ce8c5ca49c5f444e8da2bbeee0a8) --- source4/utils/ndrdump.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source4/utils/ndrdump.c') diff --git a/source4/utils/ndrdump.c b/source4/utils/ndrdump.c index b47b068257..22310d7985 100644 --- a/source4/utils/ndrdump.c +++ b/source4/utils/ndrdump.c @@ -103,7 +103,7 @@ static void show_functions(const struct dcerpc_interface_table *p) int flags; NTSTATUS status; void *st; - struct ndr_print pr; + struct ndr_print *pr; DEBUGLEVEL = 10; @@ -172,10 +172,10 @@ static void show_functions(const struct dcerpc_interface_table *p) dump_data(0, ndr->data+ndr->offset, ndr->data_size - ndr->offset); } - pr.mem_ctx = mem_ctx; - pr.print = ndr_print_debug_helper; - pr.depth = 1; - f->ndr_print(&pr, function, flags, st); + pr = talloc_p(NULL, struct ndr_print); + pr->print = ndr_print_debug_helper; + pr->depth = 1; + f->ndr_print(pr, function, flags, st); if (!NT_STATUS_IS_OK(status) || ndr->offset != ndr->data_size) { @@ -184,6 +184,8 @@ static void show_functions(const struct dcerpc_interface_table *p) } printf("dump OK\n"); + + talloc_free(pr); return 0; } -- cgit