summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/cmd_interp.c1
-rw-r--r--source3/lib/msrpc-client.c2
-rw-r--r--source3/lib/talloc.c9
3 files changed, 10 insertions, 2 deletions
diff --git a/source3/lib/cmd_interp.c b/source3/lib/cmd_interp.c
index a9a1ad0e6b..a029d0bbd2 100644
--- a/source3/lib/cmd_interp.c
+++ b/source3/lib/cmd_interp.c
@@ -349,6 +349,7 @@ static uint32 do_command(struct client_info *info, char *line)
}
free_char_array(cmd_argc, cmd_argv);
+ parse_talloc_free(); /* Free up init_XXX memory. */
return status;
}
diff --git a/source3/lib/msrpc-client.c b/source3/lib/msrpc-client.c
index 60924ed81c..ee3ee0adcc 100644
--- a/source3/lib/msrpc-client.c
+++ b/source3/lib/msrpc-client.c
@@ -36,7 +36,7 @@ BOOL receive_msrpc(int fd, prs_struct *data, unsigned int timeout)
size_t len;
RPC_HDR hdr;
- prs_init(data, 0, 4, True);
+ prs_init(data, 0, 4, NULL, True);
ok = prs_read(data, fd, 16, timeout);
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c
index 35d4ddd211..31594d2a01 100644
--- a/source3/lib/talloc.c
+++ b/source3/lib/talloc.c
@@ -81,7 +81,7 @@ void *talloc(TALLOC_CTX *t, size_t size)
}
/* destroy a whole pool */
-void talloc_destroy(TALLOC_CTX *t)
+void talloc_destroy_pool(TALLOC_CTX *t)
{
struct talloc_chunk *c;
@@ -92,5 +92,12 @@ void talloc_destroy(TALLOC_CTX *t)
t->list = c;
}
+ t->list = NULL;
+}
+
+/* destroy a whole pool including the context */
+void talloc_destroy(TALLOC_CTX *t)
+{
+ talloc_destroy_pool(t);
free(t);
}