summaryrefslogtreecommitdiffstats
path: root/source/lib/registry/tools/regshell.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-16 16:59:37 +0000
committerAndrew Tridgell <tridge@samba.org>2006-09-16 16:59:37 +0000
commit638ece0f51a1f23a40ac205e7a0148119a55e938 (patch)
tree50cda47dc715fd1ebb0fd0c1b8557286e6f6a6d9 /source/lib/registry/tools/regshell.c
parentd0215a51f1855697ec25e29d8051d351806076e0 (diff)
downloadsamba-638ece0f51a1f23a40ac205e7a0148119a55e938.tar.gz
samba-638ece0f51a1f23a40ac205e7a0148119a55e938.tar.xz
samba-638ece0f51a1f23a40ac205e7a0148119a55e938.zip
r18584: found one of the fd leaks. The registry backend was using a
talloc(NULL, xxx) to allocate the registry context. That had two consequences 1) it was a massive memory leak, as all winreg operations leaked their entire context (including an open ldb database) every time 2) event_context_find() never found the exsting event context, so we used a new event context each time, which called epoll_create() each time, which caused a fd to be allocated
Diffstat (limited to 'source/lib/registry/tools/regshell.c')
-rw-r--r--source/lib/registry/tools/regshell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/lib/registry/tools/regshell.c b/source/lib/registry/tools/regshell.c
index 0bc1cfe3242..8436a3f505e 100644
--- a/source/lib/registry/tools/regshell.c
+++ b/source/lib/registry/tools/regshell.c
@@ -434,7 +434,7 @@ static char **reg_completion(const char *text, int start, int end)
} else if (backend) {
error = reg_open_hive(NULL, backend, poptGetArg(pc), NULL, cmdline_credentials, &curkey);
} else {
- error = reg_open_local(&h, NULL, cmdline_credentials);
+ error = reg_open_local(NULL, &h, NULL, cmdline_credentials);
}
if(!W_ERROR_IS_OK(error)) {