From 13756d0e803c228f7ff75ba996acd6afd1df0dcb Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 2 Oct 2010 11:50:26 +0200 Subject: s3: Attempt to fix bug 7665 Quite a few of our internal routines put stuff on talloc_tos() these days. In top-level netapi routines, properly allocate a stackframe and clean it again. Also, don't leak memory in the rpccli_ callers onto the libnetapi context. --- source3/lib/netapi/share.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/lib/netapi/share.c') diff --git a/source3/lib/netapi/share.c b/source3/lib/netapi/share.c index 65bcd9a3a2..4232a9e7c0 100644 --- a/source3/lib/netapi/share.c +++ b/source3/lib/netapi/share.c @@ -215,7 +215,7 @@ WERROR NetShareAdd_r(struct libnetapi_ctx *ctx, goto done; } - status = rpccli_srvsvc_NetShareAdd(pipe_cli, ctx, + status = rpccli_srvsvc_NetShareAdd(pipe_cli, talloc_tos(), r->in.server_name, r->in.level, &info, @@ -259,7 +259,7 @@ WERROR NetShareDel_r(struct libnetapi_ctx *ctx, goto done; } - status = rpccli_srvsvc_NetShareDel(pipe_cli, ctx, + status = rpccli_srvsvc_NetShareDel(pipe_cli, talloc_tos(), r->in.server_name, r->in.net_name, r->in.reserved, @@ -338,7 +338,7 @@ WERROR NetShareEnum_r(struct libnetapi_ctx *ctx, break; } - status = rpccli_srvsvc_NetShareEnumAll(pipe_cli, ctx, + status = rpccli_srvsvc_NetShareEnumAll(pipe_cli, talloc_tos(), r->in.server_name, &info_ctr, r->in.prefmaxlen, @@ -423,7 +423,7 @@ WERROR NetShareGetInfo_r(struct libnetapi_ctx *ctx, goto done; } - status = rpccli_srvsvc_NetShareGetInfo(pipe_cli, ctx, + status = rpccli_srvsvc_NetShareGetInfo(pipe_cli, talloc_tos(), r->in.server_name, r->in.net_name, r->in.level, @@ -502,7 +502,7 @@ WERROR NetShareSetInfo_r(struct libnetapi_ctx *ctx, goto done; } - status = rpccli_srvsvc_NetShareSetInfo(pipe_cli, ctx, + status = rpccli_srvsvc_NetShareSetInfo(pipe_cli, talloc_tos(), r->in.server_name, r->in.net_name, r->in.level, -- cgit