summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-07-13 00:20:03 +0200
committerMichael Adam <obnox@samba.org>2012-07-13 00:57:20 +0200
commit342ab9750657bd34d7212f7121d47a06b6b12aa5 (patch)
tree1b21420012513e2a2d776fa585875c3750be1156 /source4/lib
parent6ee16cefc98c8a033664be476be4446599450d23 (diff)
downloadsamba-342ab9750657bd34d7212f7121d47a06b6b12aa5.tar.gz
samba-342ab9750657bd34d7212f7121d47a06b6b12aa5.tar.bz2
samba-342ab9750657bd34d7212f7121d47a06b6b12aa5.zip
s4:registry:regdiff: add TALLOC_CTX * argument to open_backend()
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/tools/regdiff.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c
index 3683e76da6..08c88a62ed 100644
--- a/source4/lib/registry/tools/regdiff.c
+++ b/source4/lib/registry/tools/regdiff.c
@@ -28,7 +28,8 @@
enum reg_backend { REG_UNKNOWN, REG_LOCAL, REG_REMOTE, REG_NULL };
-static struct registry_context *open_backend(poptContext pc,
+static struct registry_context *open_backend(TALLOC_CTX *mem_ctx,
+ poptContext pc,
struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
enum reg_backend backend,
@@ -42,14 +43,14 @@ static struct registry_context *open_backend(poptContext pc,
poptPrintUsage(pc, stderr, 0);
return NULL;
case REG_LOCAL:
- error = reg_open_samba(NULL, &ctx, ev_ctx, lp_ctx, NULL, cmdline_credentials);
+ error = reg_open_samba(mem_ctx, &ctx, ev_ctx, lp_ctx, NULL, cmdline_credentials);
break;
case REG_REMOTE:
- error = reg_open_remote(NULL, &ctx, NULL, cmdline_credentials, lp_ctx,
+ error = reg_open_remote(mem_ctx, &ctx, NULL, cmdline_credentials, lp_ctx,
remote_host, ev_ctx);
break;
case REG_NULL:
- error = reg_open_local(NULL, &ctx);
+ error = reg_open_local(mem_ctx, &ctx);
break;
}
@@ -120,11 +121,11 @@ int main(int argc, const char **argv)
ev_ctx = s4_event_context_init(NULL);
- h1 = open_backend(pc, ev_ctx, cmdline_lp_ctx, backend1, remote1);
+ h1 = open_backend(ctx, pc, ev_ctx, cmdline_lp_ctx, backend1, remote1);
if (h1 == NULL)
return 1;
- h2 = open_backend(pc, ev_ctx, cmdline_lp_ctx, backend2, remote2);
+ h2 = open_backend(ctx, pc, ev_ctx, cmdline_lp_ctx, backend2, remote2);
if (h2 == NULL)
return 1;