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
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;
}
/* 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;
}