From: David Disseldorp Date: Fri, 12 Jul 2019 15:29:23 +0000 (+0200) Subject: netlogon: Fix potential use of uninitialized variable X-Git-Tag: tdb-1.4.2~418 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93d424528f1c3d0d50ebd8a784f4624b2721d416;p=thirdparty%2Fsamba.git netlogon: Fix potential use of uninitialized variable The _netr_NetrEnumerateTrustedDomains()->dcerpc_lsa_open_policy2() error path checks the policy handle and closes it if non-empty. The policy handle may be uninitialized in this code-path - fix this. Signed-off-by: David Disseldorp Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c index 791aa7acaff..08bce367bf0 100644 --- a/source3/rpc_server/netlogon/srv_netlog_nt.c +++ b/source3/rpc_server/netlogon/srv_netlog_nt.c @@ -419,6 +419,7 @@ NTSTATUS _netr_NetrEnumerateTrustedDomains(struct pipes_struct *p, int i; uint32_t max_size = (uint32_t)-1; + ZERO_STRUCT(pol); DEBUG(6,("_netr_NetrEnumerateTrustedDomains: %d\n", __LINE__)); status = rpcint_binding_handle(p->mem_ctx,