diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2018-01-26 09:12:12 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-02-01 00:33:34 +0100 |
commit | 925dc87a2ae47ba67e33d46b059fd9a57772dabf (patch) | |
tree | 0b836556b3d69600f8b3dbe175b2e78ca15c1d84 /source4/libnet | |
parent | 21eb5169f46b8d819a5d5d028baff581e4e63de6 (diff) | |
download | samba-925dc87a2ae47ba67e33d46b059fd9a57772dabf.tar.gz |
talloc_zero libnet_context on init
Zero the libnet_context on initialization
preventing an uninitalized cli_credentials struct.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 1 00:33:34 CET 2018 on sn-devel-144
Diffstat (limited to 'source4/libnet')
-rw-r--r-- | source4/libnet/libnet.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source4/libnet/libnet.c b/source4/libnet/libnet.c index 32df85d5279..a590893bee2 100644 --- a/source4/libnet/libnet.c +++ b/source4/libnet/libnet.c @@ -33,8 +33,8 @@ struct libnet_context *libnet_context_init(struct tevent_context *ev, return NULL; } - /* create brand new libnet context */ - ctx = talloc(ev, struct libnet_context); + /* create brand new libnet context */ + ctx = talloc_zero(ev, struct libnet_context); if (!ctx) { return NULL; } @@ -48,14 +48,8 @@ struct libnet_context *libnet_context_init(struct tevent_context *ev, /* name resolution methods */ ctx->resolve_ctx = lpcfg_resolve_context(lp_ctx); - /* connected services' params */ - ZERO_STRUCT(ctx->samr); - ZERO_STRUCT(ctx->lsa); - /* default buffer size for various operations requiring specifying a buffer */ ctx->samr.buf_size = 128; - ctx->server_address = NULL; - return ctx; } |