summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-03-25 12:13:36 +0100
committerGünther Deschner <gd@samba.org>2011-03-25 18:21:18 +0100
commit5779460f3ffff0f929d0621b4ea4d1883abb878f (patch)
tree5fbf79e214c092eba8a51e3014c6f7b266df7707
parent26253e04604d2ac6c747a87433a87476f834ac4f (diff)
downloadsamba-5779460f3ffff0f929d0621b4ea4d1883abb878f.tar.gz
samba-5779460f3ffff0f929d0621b4ea4d1883abb878f.tar.bz2
samba-5779460f3ffff0f929d0621b4ea4d1883abb878f.zip
s3-netapi: fix memoryleak while not using talloc_tos() in cli_get_session_key() usage.
Thanks Volker! Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Mar 25 18:21:18 CET 2011 on sn-devel-104
-rw-r--r--source3/lib/netapi/joindomain.c8
-rw-r--r--source3/lib/netapi/user.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c
index edc45efe9e..b6fb57ae02 100644
--- a/source3/lib/netapi/joindomain.c
+++ b/source3/lib/netapi/joindomain.c
@@ -126,7 +126,7 @@ WERROR NetJoinDomain_r(struct libnetapi_ctx *ctx,
if (r->in.password) {
- status = cli_get_session_key(ctx, pipe_cli, &session_key);
+ status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key);
if (!NT_STATUS_IS_OK(status)) {
werr = ntstatus_to_werror(status);
goto done;
@@ -267,7 +267,7 @@ WERROR NetUnjoinDomain_r(struct libnetapi_ctx *ctx,
if (r->in.password) {
- status = cli_get_session_key(ctx, pipe_cli, &session_key);
+ status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key);
if (!NT_STATUS_IS_OK(status)) {
werr = ntstatus_to_werror(status);
goto done;
@@ -465,7 +465,7 @@ WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx,
if (r->in.password) {
- status = cli_get_session_key(ctx, pipe_cli, &session_key);
+ status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key);
if (!NT_STATUS_IS_OK(status)) {
werr = ntstatus_to_werror(status);
goto done;
@@ -518,7 +518,7 @@ WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx *ctx,
if (r->in.password) {
- status = cli_get_session_key(ctx, pipe_cli, &session_key);
+ status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key);
if (!NT_STATUS_IS_OK(status)) {
werr = ntstatus_to_werror(status);
goto done;
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 29f609d7bc..63be7ac751 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -483,7 +483,7 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx,
goto done;
}
- status = cli_get_session_key(ctx, pipe_cli, &session_key);
+ status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key);
if (!NT_STATUS_IS_OK(status)) {
werr = ntstatus_to_werror(status);
goto done;
@@ -1989,7 +1989,7 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
goto done;
}
- status = cli_get_session_key(ctx, pipe_cli, &session_key);
+ status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key);
if (!NT_STATUS_IS_OK(status)) {
werr = ntstatus_to_werror(status);
goto done;