netlogon: Fix potential use of uninitialized variable
authorDavid Disseldorp <ddiss@samba.org>
Fri, 12 Jul 2019 15:29:23 +0000 (17:29 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 26 Jul 2019 01:48:27 +0000 (01:48 +0000)
commit93d424528f1c3d0d50ebd8a784f4624b2721d416
tree63a3e57ab43001802106f5c9bcdb4b34df6ab47a
parent1c84bda361678cb6c4685cff17a2d5a5026f2bce
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>
source3/rpc_server/netlogon/srv_netlog_nt.c