summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2019-07-12 17:29:23 +0200
committerAndrew Bartlett <abartlet@samba.org>2019-07-26 01:48:27 +0000
commit93d424528f1c3d0d50ebd8a784f4624b2721d416 (patch)
tree63a3e57ab43001802106f5c9bcdb4b34df6ab47a /source3/rpc_server
parent1c84bda361678cb6c4685cff17a2d5a5026f2bce (diff)
downloadsamba-93d424528f1c3d0d50ebd8a784f4624b2721d416.tar.gz
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 <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/netlogon/srv_netlog_nt.c1
1 files changed, 1 insertions, 0 deletions
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,