From 62e11c4f1748d98f479110c8c0e656a8f65dca4d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 16 Jan 2007 15:42:03 +0000 Subject: r20832: Remove extra pointers previously added to unique [out] pointers. Instead, add [ref] pointers where necessary (top-level [ref] pointers, by spec, don't appear on the wire). This brings us closer to the DCE/RPC standard again. (This used to be commit 580f2a7197b1bc9db14a643fdd112b40ef37aaef) --- source3/utils/net_rpc_registry.c | 45 ++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 30 deletions(-) (limited to 'source3/utils/net_rpc_registry.c') diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index e63471f176e..0a3ceb2233c 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -139,10 +139,8 @@ static NTSTATUS registry_enumkeys(TALLOC_CTX *ctx, for (i=0; iname && - (!(classes[i] = talloc_strdup(classes, - pclass_buf->name)))) { + if (class_buf.name && + (!(classes[i] = talloc_strdup(classes, class_buf.name)))) { status = NT_STATUS_NO_MEMORY; goto error; } @@ -181,9 +178,8 @@ static NTSTATUS registry_enumkeys(TALLOC_CTX *ctx, goto error; } - if ((pmodtime) && - (!(modtimes[i] = (NTTIME *)talloc_memdup( - modtimes, pmodtime, sizeof(*pmodtime))))) { + if ((!(modtimes[i] = (NTTIME *)talloc_memdup( + modtimes, &modtime, sizeof(modtime))))) { status = NT_STATUS_NO_MEMORY; goto error; } @@ -254,15 +250,9 @@ static NTSTATUS registry_enumvalues(TALLOC_CTX *ctx, for (i=0; i