summaryrefslogtreecommitdiff
path: root/source4/utils/ndrdump.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-21 07:43:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:14 -0500
commitb7e1ea20dc873a753ff64653987130f03897a4e9 (patch)
tree67f37a1a19113c622dedf942f39b27ca994c1b05 /source4/utils/ndrdump.c
parentb45f4ebbb880e41abf86abb54264123f3edbde05 (diff)
downloadsamba-b7e1ea20dc873a753ff64653987130f03897a4e9.tar.gz
samba-b7e1ea20dc873a753ff64653987130f03897a4e9.tar.bz2
samba-b7e1ea20dc873a753ff64653987130f03897a4e9.zip
r1985: take advantage of the new talloc in a few more places
(This used to be commit 6ffdfd779936ce8c5ca49c5f444e8da2bbeee0a8)
Diffstat (limited to 'source4/utils/ndrdump.c')
-rw-r--r--source4/utils/ndrdump.c12
1 files changed, 7 insertions, 5 deletions
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;
}