From 5779460f3ffff0f929d0621b4ea4d1883abb878f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 25 Mar 2011 12:13:36 +0100 Subject: s3-netapi: fix memoryleak while not using talloc_tos() in cli_get_session_key() usage. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks Volker! Guenther Autobuild-User: Günther Deschner Autobuild-Date: Fri Mar 25 18:21:18 CET 2011 on sn-devel-104 --- source3/lib/netapi/joindomain.c | 8 ++++---- source3/lib/netapi/user.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/lib') 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; -- cgit